Skip to content

Commit

Permalink
fix(examples): remove octal format from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed Dec 9, 2024
1 parent 327b3e9 commit ca4af7c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions examples/color/bubbletea/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ func newStyles(backgroundIsDark bool) (s *styles) {

s.activeButton = lipgloss.NewStyle().
Padding(0, 3).
Background(lipgloss.Color("0xFF6AD2")). // you can also use octal format for colors, i.e 0xff38ec.
Foreground(lipgloss.Color("0xFFFCC2"))
Background(lipgloss.Color("#FF6AD2")).
Foreground(lipgloss.Color("#FFFCC2"))
s.inactiveButton = s.activeButton.
Background(lightDark(
lipgloss.Color("0x988F95"),
lipgloss.Color("0x978692"))).
lipgloss.Color("#988F95"),
lipgloss.Color("#978692"))).
Foreground(lightDark(
lipgloss.Color("0xFDFCE3"),
lipgloss.Color("0xFBFAE7")))
lipgloss.Color("#FDFCE3"),
lipgloss.Color("#FBFAE7")))
return s
}

Expand Down
8 changes: 4 additions & 4 deletions examples/color/standalone/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ func main() {

activeButton := lipgloss.NewStyle().
Padding(0, 3).
Background(lipgloss.Color("0xFF6AD2")). // you can also use octal format for colors, i.e 0xff38ec.
Foreground(lipgloss.Color("0xFFFCC2"))
Background(lipgloss.Color("#FF6AD2")).
Foreground(lipgloss.Color("#FFFCC2"))
inactiveButton := activeButton.
Background(lightDark(lipgloss.Color("0x988F95"), lipgloss.Color("0x978692"))).
Foreground(lightDark(lipgloss.Color("0xFDFCE3"), lipgloss.Color("0xFBFAE7")))
Background(lightDark(lipgloss.Color("#988F95"), lipgloss.Color("#978692"))).
Foreground(lightDark(lipgloss.Color("#FDFCE3"), lipgloss.Color("#FBFAE7")))

// Build layout.
text := paragraphStyle.Render(
Expand Down
8 changes: 4 additions & 4 deletions examples/compat/bubbletea/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var (
frameColor = compat.AdaptiveColor{Light: lipgloss.Color("#C5ADF9"), Dark: lipgloss.Color("#864EFF")}
textColor = compat.AdaptiveColor{Light: lipgloss.Color("#696969"), Dark: lipgloss.Color("#bdbdbd")}
keywordColor = compat.AdaptiveColor{Light: lipgloss.Color("#37CD96"), Dark: lipgloss.Color("#22C78A")}
inactiveBgColor = compat.AdaptiveColor{Light: lipgloss.Color("0x988F95"), Dark: lipgloss.Color("0x978692")}
inactiveFgColor = compat.AdaptiveColor{Light: lipgloss.Color("0xFDFCE3"), Dark: lipgloss.Color("0xFBFAE7")}
inactiveBgColor = compat.AdaptiveColor{Light: lipgloss.Color("#988F95"), Dark: lipgloss.Color("#978692")}
inactiveFgColor = compat.AdaptiveColor{Light: lipgloss.Color("#FDFCE3"), Dark: lipgloss.Color("#FBFAE7")}
)

// Style definitions.
Expand Down Expand Up @@ -48,8 +48,8 @@ func newStyles() (s styles) {

s.activeButton = lipgloss.NewStyle().
Padding(0, 3).
Background(lipgloss.Color("0xFF6AD2")). // you can also use octal format for colors, i.e 0xff38ec.
Foreground(lipgloss.Color("0xFFFCC2"))
Background(lipgloss.Color("#FF6AD2")).
Foreground(lipgloss.Color("#FFFCC2"))
s.inactiveButton = s.activeButton.
Background(inactiveBgColor).
Foreground(inactiveFgColor)
Expand Down
8 changes: 4 additions & 4 deletions examples/compat/standalone/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ var (
frameColor = compat.AdaptiveColor{Light: lipgloss.Color("#C5ADF9"), Dark: lipgloss.Color("#864EFF")}
textColor = compat.AdaptiveColor{Light: lipgloss.Color("#696969"), Dark: lipgloss.Color("#bdbdbd")}
keywordColor = compat.AdaptiveColor{Light: lipgloss.Color("#37CD96"), Dark: lipgloss.Color("#22C78A")}
inactiveBgColor = compat.AdaptiveColor{Light: lipgloss.Color("0x988F95"), Dark: lipgloss.Color("0x978692")}
inactiveFgColor = compat.AdaptiveColor{Light: lipgloss.Color("0xFDFCE3"), Dark: lipgloss.Color("0xFBFAE7")}
inactiveBgColor = compat.AdaptiveColor{Light: lipgloss.Color("#988F95"), Dark: lipgloss.Color("#978692")}
inactiveFgColor = compat.AdaptiveColor{Light: lipgloss.Color("#FDFCE3"), Dark: lipgloss.Color("#FBFAE7")}
)

func main() {
Expand All @@ -39,8 +39,8 @@ func main() {

activeButton := lipgloss.NewStyle().
Padding(0, 3).
Background(lipgloss.Color("0xFF6AD2")). // you can also use octal format for colors, i.e 0xff38ec.
Foreground(lipgloss.Color("0xFFFCC2"))
Background(lipgloss.Color("#FF6AD2")).
Foreground(lipgloss.Color("#FFFCC2"))
inactiveButton := activeButton.
Background(inactiveBgColor).
Foreground(inactiveFgColor)
Expand Down

0 comments on commit ca4af7c

Please sign in to comment.