Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(colors): update to lipgloss alpha #168

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 75 additions & 23 deletions colors/colors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,85 @@ package colors
import "github.com/charmbracelet/lipgloss"

var (
WhiteBright = lipgloss.AdaptiveColor{Light: "#FFFDF5", Dark: "#FFFDF5"}
Light = Colors{
WhiteBright: lipgloss.Color("#FFFDF5"),
Normal: lipgloss.Color("#1A1A1A"),
NormalDim: lipgloss.Color("#A49FA5"),
Gray: lipgloss.Color("#909090"),
GrayMid: lipgloss.Color("#B2B2B2"),
GrayDark: lipgloss.Color("#DDDADA"),
GrayBright: lipgloss.Color("#847A85"),
GrayBrightDim: lipgloss.Color("#C2B8C2"),
Indigo: lipgloss.Color("#5A56E0"),
IndigoDim: lipgloss.Color("#9498FF"),
IndigoSubtle: lipgloss.Color("#7D79F6"),
IndigoSubtleDim: lipgloss.Color("#BBBDFF"),
YellowGreen: lipgloss.Color("#04B575"),
YellowGreenDull: lipgloss.Color("#6BCB94"),
Fuschia: lipgloss.Color("#EE6FF8"),
FuchsiaDim: lipgloss.Color("#F1A8FF"),
FuchsiaDull: lipgloss.Color("#AD58B4"),
FuchsiaDullDim: lipgloss.Color("#F6C9FF"),
Green: lipgloss.Color("#04B575"),
GreenDim: lipgloss.Color("#72D2B0"),
Red: lipgloss.Color("#FF4672"),
RedDull: lipgloss.Color("#FF6F91"),
}

Normal = lipgloss.AdaptiveColor{Light: "#1A1A1A", Dark: "#dddddd"}
NormalDim = lipgloss.AdaptiveColor{Light: "#A49FA5", Dark: "#777777"}
Dark = Colors{
WhiteBright: lipgloss.Color("#FFFDF5"),
Normal: lipgloss.Color("#dddddd"),
NormalDim: lipgloss.Color("#777777"),
Gray: lipgloss.Color("626262"),
GrayMid: lipgloss.Color("#4A4A4A"),
GrayDark: lipgloss.Color("#222222"),
GrayBright: lipgloss.Color("#979797"),
GrayBrightDim: lipgloss.Color("#4D4D4D"),
Indigo: lipgloss.Color("#7571F9"),
IndigoDim: lipgloss.Color("#494690"),
IndigoSubtle: lipgloss.Color("#514DC1"),
IndigoSubtleDim: lipgloss.Color("#383584"),
YellowGreen: lipgloss.Color("#ECFD65"),
YellowGreenDull: lipgloss.Color("#9BA92F"),
Fuschia: lipgloss.Color("#EE6FF8"),
FuchsiaDim: lipgloss.Color("#99519E"),
FuchsiaDull: lipgloss.Color("#AD58B4"),
FuchsiaDullDim: lipgloss.Color("#6B3A6F"),
Green: lipgloss.Color("#04B575"),
GreenDim: lipgloss.Color("#0B5137"),
Red: lipgloss.Color("#ED567A"),
RedDull: lipgloss.Color("#C74665"),
}
)

Gray = lipgloss.AdaptiveColor{Light: "#909090", Dark: "#626262"}
GrayMid = lipgloss.AdaptiveColor{Light: "#B2B2B2", Dark: "#4A4A4A"}
GrayDark = lipgloss.AdaptiveColor{Light: "#DDDADA", Dark: "#222222"}
GrayBright = lipgloss.AdaptiveColor{Light: "#847A85", Dark: "#979797"}
GrayBrightDim = lipgloss.AdaptiveColor{Light: "#C2B8C2", Dark: "#4D4D4D"}
type Colors struct {
WhiteBright lipgloss.TerminalColor

Indigo = lipgloss.AdaptiveColor{Light: "#5A56E0", Dark: "#7571F9"}
IndigoDim = lipgloss.AdaptiveColor{Light: "#9498FF", Dark: "#494690"}
IndigoSubtle = lipgloss.AdaptiveColor{Light: "#7D79F6", Dark: "#514DC1"}
IndigoSubtleDim = lipgloss.AdaptiveColor{Light: "#BBBDFF", Dark: "#383584"}
Normal lipgloss.TerminalColor
NormalDim lipgloss.TerminalColor

YellowGreen = lipgloss.AdaptiveColor{Light: "#04B575", Dark: "#ECFD65"}
YellowGreenDull = lipgloss.AdaptiveColor{Light: "#6BCB94", Dark: "#9BA92F"}
Gray lipgloss.TerminalColor
GrayMid lipgloss.TerminalColor
GrayDark lipgloss.TerminalColor
GrayBright lipgloss.TerminalColor
GrayBrightDim lipgloss.TerminalColor

Fuschia = lipgloss.AdaptiveColor{Light: "#EE6FF8", Dark: "#EE6FF8"}
FuchsiaDim = lipgloss.AdaptiveColor{Light: "#F1A8FF", Dark: "#99519E"}
FuchsiaDull = lipgloss.AdaptiveColor{Dark: "#AD58B4", Light: "#F793FF"}
FuchsiaDullDim = lipgloss.AdaptiveColor{Light: "#F6C9FF", Dark: "#6B3A6F"}
Indigo lipgloss.TerminalColor
IndigoDim lipgloss.TerminalColor
IndigoSubtle lipgloss.TerminalColor
IndigoSubtleDim lipgloss.TerminalColor

Green = lipgloss.Color("#04B575")
GreenDim = lipgloss.AdaptiveColor{Light: "#72D2B0", Dark: "#0B5137"}
YellowGreen lipgloss.TerminalColor
YellowGreenDull lipgloss.TerminalColor

Red = lipgloss.AdaptiveColor{Light: "#FF4672", Dark: "#ED567A"}
RedDull = lipgloss.AdaptiveColor{Light: "#FF6F91", Dark: "#C74665"}
)
Fuschia lipgloss.TerminalColor
FuchsiaDim lipgloss.TerminalColor
FuchsiaDull lipgloss.TerminalColor
FuchsiaDullDim lipgloss.TerminalColor

Green lipgloss.TerminalColor
GreenDim lipgloss.TerminalColor

Red lipgloss.TerminalColor
RedDull lipgloss.TerminalColor
}
2 changes: 2 additions & 0 deletions colors/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
golang.org/x/sys v0.22.0 // indirect
)

replace github.com/charmbracelet/lipgloss => github.com/charmbracelet/lipgloss v0.12.2-0.20240722162534-2390dea254e8
4 changes: 2 additions & 2 deletions colors/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
github.com/charmbracelet/lipgloss v0.12.1 h1:/gmzszl+pedQpjCOH+wFkZr/N90Snz40J/NR7A0zQcs=
github.com/charmbracelet/lipgloss v0.12.1/go.mod h1:V2CiwIuhx9S1S1ZlADfOj9HmxeMAORuz5izHb0zGbB8=
github.com/charmbracelet/lipgloss v0.12.2-0.20240722162534-2390dea254e8 h1:7SMpm8y17K515kM1Q/tiOrSm1jb3hJh94W+LXHWKv+U=
github.com/charmbracelet/lipgloss v0.12.2-0.20240722162534-2390dea254e8/go.mod h1:LCQCsVTQm+lcQLFSiHwSvQUqRXtry1v/2KCfKxdsCeY=
github.com/charmbracelet/x/ansi v0.1.4 h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM=
github.com/charmbracelet/x/ansi v0.1.4/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
Expand Down
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
Expand Down
Loading