Documentation
¶
Overview ¶
Package theme holds Stormlight's palette.
The colors live here rather than inside internal/ui because the Claude transcript renderer paints its own output: only the renderer knows which run of text is a prompt, a tool call, or a trimmed result, and rebuilding that structure downstream from markers would be guesswork.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Accent is the one entry that does not vary: it is the wordmark's // blue, chosen to sit legibly on either background, and it stays a // Pair only so every palette entry resolves the same way. Accent = Pair{Light: "#62AEEF", Dark: "#62AEEF"} Text = Pair{Light: "#24323A", Dark: "#D7DEE5"} // TextSoft is Text barely receded, a third of the way to Muted: the // title of the card on the selection path that the cursor is not // on, a shade behind the cursor's card the way its border is. TextSoft = Pair{Light: "#3F4D56", Dark: "#B4BDC5"} Muted = Pair{Light: "#70808A", Dark: "#74818B"} Working = Pair{Light: "#26799D", Dark: "#61AFEF"} Waiting = Pair{Light: "#A86600", Dark: "#E5C07B"} Done = Pair{Light: "#257A4A", Dark: "#72C087"} Failed = Pair{Light: "#B33838", Dark: "#E06C75"} Border = Pair{Light: "#AAB3B9", Dark: "#59636B"} Select = Pair{Light: "#E1E4E6", Dark: "#3D4245"} SelectedText = Pair{Light: "#172027", Dark: "#F3F5F6"} DangerBg = Pair{Light: "#F2D5D1", Dark: "#552B29"} // Code tints literals and fenced blocks in rendered transcripts — a // teal drawn from the wordmark's cool end so code reads as a different // substance than prose without competing with the status colors. Code = Pair{Light: "#0E7C6B", Dark: "#8FDCCB"} // PortalInk is the window bar's text on its Accent-filled band while // the terminal holds the keyboard. The Accent is identical on both // grounds, so its ink is too. PortalInk = Pair{Light: "#0F2338", Dark: "#0F2338"} // Band is the title strip's ground: the wordmark gradient's sky stop // lifted toward white — icy blue rather than the crest's mint, so the // strip reads as Stormlight's light without drifting green. Carries // PortalInk the same as the Accent does. Band = Pair{Light: "#B9D9EF", Dark: "#C6E9FF"} // BandMuted is the roster segment the cursor is not in: distinctly // below Band in the same hue, so the selected pane's segment reads // brighter at a glance without breaking the shared surface. BandMuted = Pair{Light: "#D5E7F2", Dark: "#8AB3D1"} // BandSoft is the Band barely receded: the card on the selection // path that the cursor is not on, lit like the cursor's card but a // shade behind it, so the eye finds the cursor without the other // card falling out of the path. A third of the way to BandMuted. BandSoft = Pair{Light: "#C3DEF0", Dark: "#B1D6EF"} // BandDim is the same surface receded: the roster half of the strip // steps back while the keyboard lives in the portal, so the lit // band always means "you are on this side of the seam". BandDim = Pair{Light: "#E8F1F7", Dark: "#59707F"} // AccentDim is the terminal segment at rest: the accent receded the // way BandDim recedes the roster's silver, so the strip dims and // brightens in one language on both sides of the seam. AccentDim = Pair{Light: "#A8CBE8", Dark: "#3A607F"} )
Functions ¶
func Hex ¶
Hex resolves a palette entry to its literal hex string.
A markdown stylesheet is not rendered through Lip Gloss — it is a data structure of color strings handed to the markdown renderer before any output exists — so it needs the string rather than the color.
func Resolve ¶ added in v0.6.2
func Resolve(isDark bool)
Resolve records the terminal background the palette should paint for.
The dashboard calls this when Bubble Tea answers RequestBackgroundColor. Because every style is built by a function rather than held in a package variable, entries resolved before the answer arrives are not cached — the next frame simply paints with the corrected palette.
Types ¶
type Pair ¶ added in v0.6.2
type Pair struct{ Light, Dark string }
Pair is a palette entry: the same role painted for a light terminal and for a dark one.
Lip Gloss v1 carried this distinction itself as an AdaptiveColor and resolved it at render time, querying the terminal behind the program's back. v2 removed that — a color is a color, and choosing between variants is the program's job — so the pair stays unresolved here until Color or Hex is asked for one, against the background Resolve recorded.