Documentation
¶
Overview ¶
Package palette holds the named color roles for dotdrift's colored CLI output and their per-profile overrides.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Palette ¶
type Palette struct {
// contains filtered or unexported fields
}
Palette maps roles to raw SGR parameter sequences (no ESC/CSI wrapper).
func Default ¶
func Default() *Palette
Default returns the built-in palette. Missing stays orange (38;5;208) — the light-red experiment was reverted; orange keeps missing visually distinct from hard failures (error red) while reading as "absent, not broken".
func FromConfig ¶
FromConfig builds a palette from [colors] overrides (role → raw SGR params). Unknown roles and malformed values are errors — a typo must fail loudly at dotdrift.toml load, never silently keep the default.
type Role ¶
type Role string
Role is one named color slot. The vocabulary is shared by status, modules, plan, and diff output.
const ( OK Role = "ok" // all-checks-passed, no-drift Missing Role = "missing" // missing/removed items (light red) Warn Role = "warn" // content/version differs (yellow) Error Role = "error" // unknown, not-a-symlink (red) Orphan Role = "orphan" // orphans section (magenta) Dim Role = "dim" // dimmed module/description text )