Documentation
¶
Overview ¶
Package theme is the color vocabulary the UI draws with. A Theme names colors by role, the same roles the web client's DaisyUI theme block declares (base, primary, secondary, accent, neutral, info, success, warning, error, plus the chat-specific username), so a theme ported from the site's CSS is a copy of numbers, not a redesign. Widgets ask for a role, never a color, which is what lets a second theme exist without touching them (ADR 0005).
Colors are exact sRGB; Bubble Tea's renderer downsamples them to the terminal's profile and drops them under NO_COLOR, so nothing here needs to know what the terminal can show.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Theme ¶
type Theme struct {
Name string
// Base100 is the app background, Base200 panels, Base300 borders and
// hover. The terminal keeps its own background (see ADR 0005), so
// Base100 is what the splash paints and what text roles are tuned
// against, not what the chat screen fills.
Base100, Base200, Base300 color.Color
// BaseContent is body text on the base surfaces.
BaseContent color.Color
// Primary is the brand color; PrimaryContent is text on it. The
// status bar is primary on primary-content, and the splash wordmark
// is drawn in primary.
Primary, PrimaryContent color.Color
// Secondary is the second warm tone; on the site it carries links,
// MOTD framing and mod names.
Secondary, SecondaryContent color.Color
// Accent is the loud one, reserved for what must stand out: DMs.
Accent, AccentContent color.Color
// Neutral is chrome that is neither surface nor brand.
Neutral, NeutralContent color.Color
Info, InfoContent color.Color
Success, SuccessContent color.Color
Warning, WarningContent color.Color
Error, ErrorContent color.Color
// Username colors ordinary speakers. The site keeps it outside the
// DaisyUI block because DaisyUI has no such role; it is a role here
// because most of the transcript is names and they must not read as
// the loud brand color.
Username color.Color
}
Theme is one named palette. Every field is set for every built-in theme; a widget may rely on that.