Documentation
¶
Overview ¶
Package theme defines the lipgloss styles used across the UI. All colors live here; views and components never hardcode colors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccentColor ¶
AccentColor returns the color for a named accent (case-insensitive), or false if name is not a known accent.
func AccentNames ¶
func AccentNames() []string
AccentNames returns the accent color names in a stable order — the choices offered by the color picker.
func Contrast ¶
Contrast returns a foreground color (black or white) that stays legible when drawn on top of bg, chosen by perceived luminance. Used for the header's highlight chip so the profile name reads on any accent (e.g. dark on yellow, light on red).
func HighlightColor ¶
HighlightColor resolves the highlight color a user configured for a profile via skins globs (e.g. "PROD-*": red). It returns false when no glob matches or the mapped name is not a known color — a typo just leaves the profile with the default (uncoloured) treatment rather than breaking rendering.
Types ¶
type Theme ¶
type Theme struct {
// Accent is the app-wide highlight color.
Accent color.Color
Logo lipgloss.Style
Title lipgloss.Style
Subtle lipgloss.Style
Error lipgloss.Style
Success lipgloss.Style
Warning lipgloss.Style
KeyHint lipgloss.Style
KeyLabel lipgloss.Style
}
Theme is the set of styles the app renders with. The accent is app-wide and constant; per-profile highlighting (see skins.go) colors only the header name/host, leaving the rest of the UI on the default accent.