Documentation
¶
Overview ¶
Package theme loads TUI color themes: embedded built-ins plus user theme files. A theme is a set of color roles; the TUI decides what each role colors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuiltinOrder = []string{
"dark", "light", "high-contrast", "mono",
"tokyo-night", "tokyo-night-storm", "tokyo-night-day",
"catppuccin-mocha", "catppuccin-latte", "dracula", "nord", "gruvbox-dark",
"solarized-dark", "solarized-light",
}
BuiltinOrder is the order built-ins are listed and cycled in.
Functions ¶
Types ¶
type Palette ¶
type Palette struct {
ID string `toml:"-"`
Source string `toml:"-"` // "built-in" or the file it was loaded from
Name string `toml:"name"`
Background string `toml:"background"`
Foreground string `toml:"foreground"`
Muted string `toml:"muted"`
Border string `toml:"border"`
Accent string `toml:"accent"`
OnAccent string `toml:"on_accent"`
Heading string `toml:"heading"`
Selection string `toml:"selection"`
Success string `toml:"success"`
Warning string `toml:"warning"`
Error string `toml:"error"`
Attention string `toml:"attention"`
Special string `toml:"special"`
Info string `toml:"info"`
}
Palette is one theme. Every role is optional: empty means the terminal's own color (or plain/bold/reverse for structure).
func (Palette) ReadabilityProblems ¶
ReadabilityProblems applies the readability rule. Themes without a background use the terminal's, so they can't be checked.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds the available themes in display order.
Click to show internal directories.
Click to hide internal directories.