Documentation
¶
Overview ¶
Package theme owns the application color palette and the bridge from user config (a Theme struct deserialized from config.json) into the mutable lipgloss colors used by package ui. The visualizers package still has hardcoded colors today; migrating those to read from this palette is a separate piece of work.
Lipgloss styles capture their colors by value at construction time, so callers must construct/rebuild any styles that reference these vars AFTER Apply has run. The ui.RebuildStyles function in package ui takes care of that for the main UI palette.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Primary = lipgloss.AdaptiveColor{Light: "#874BFD", Dark: "#58f796"} Secondary = lipgloss.AdaptiveColor{Light: "#6232CC", Dark: "#b48eff"} Muted = lipgloss.AdaptiveColor{Light: "#9B9B9B", Dark: "#626262"} Subtle = lipgloss.AdaptiveColor{Light: "#6C6C6C", Dark: "#8a8a8a"} Dim = lipgloss.AdaptiveColor{Light: "#BCBCBC", Dark: "#444444"} Error = lipgloss.AdaptiveColor{Light: "#FF0000", Dark: "#ff0087"} Text = lipgloss.AdaptiveColor{Light: "#1a1a1a", Dark: "#dddddd"} TextDim = lipgloss.AdaptiveColor{Light: "#A49FA5", Dark: "#777777"} Tip = lipgloss.AdaptiveColor{Light: "#D4A017", Dark: "#FFD866"} OnPrimary = lipgloss.AdaptiveColor{Light: "#000000", Dark: "#000000"} GradientStart = lipgloss.AdaptiveColor{Light: "#e4d4f7", Dark: "#110a24"} GradientEnd = lipgloss.AdaptiveColor{Light: "#f8f5fc", Dark: "#040208"} )
Palette — exported, mutable. Reassigned by Apply at startup.
Functions ¶
Types ¶
type Theme ¶
type Theme struct {
Primary Variant `json:"primary,omitempty"`
Secondary Variant `json:"secondary,omitempty"`
Muted Variant `json:"muted,omitempty"`
Subtle Variant `json:"subtle,omitempty"`
Dim Variant `json:"dim,omitempty"`
Error Variant `json:"error,omitempty"`
Text Variant `json:"text,omitempty"`
TextDim Variant `json:"text_dim,omitempty"`
Tip Variant `json:"tip,omitempty"`
OnPrimary Variant `json:"on_primary,omitempty"`
GradientStart Variant `json:"gradient_start,omitempty"`
GradientEnd Variant `json:"gradient_end,omitempty"`
}
Theme is the user-overridable palette. Zero-valued entries preserve package defaults.