Documentation
¶
Overview ¶
Package theme provides theme file parsing and serialization for revdiff color palettes. Theme files use INI format with comment-based metadata (# name: ..., # description: ...).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BundledNames ¶
func BundledNames() []string
BundledNames returns the sorted list of bundled theme names.
func ColorKeys ¶
func ColorKeys() []string
ColorKeys returns the ordered list of recognized color key names.
func Dump ¶
Dump writes a theme file to w from the given Theme. Colors are written in the canonical order defined by ColorKeys().
func InitBundled ¶
InitBundled writes bundled theme files to the given directory, creating it if needed. Always overwrites files matching bundled theme names; does not touch user-added files.
Types ¶
type Theme ¶
type Theme struct {
Name string
Description string
ChromaStyle string
Colors map[string]string // keys include the "color-" prefix, matching ini-name tags exactly (e.g. "color-accent")
}
Theme represents a color theme with metadata and color key-value pairs.