Versions in this module Expand all Collapse all v0 v0.3.0 Sep 17, 2026 Changes in this version + const CustomPrefix + const DefaultID + const FamilyCustom + var Builtin = []Option + var TokenNames = []string + func Contrast(a, b RGB) float64 + func CustomSlug(id string) (string, bool) + func Families() []string + func FlattenBuiltin(desktopCSS, source string) (string, error) + func IsFamily(name string) bool + func Luminance(c RGB) float64 + func NormalizeMode(mode string) string + func ResolveAuto(family string, dark bool, currentID string) string + type Custom struct + Modes string + Name string + Slug string + func ListCustom(dir string) []Custom + func LoadCustom(dir, slug string) (Custom, error) + func (c Custom) ID() string + func (c Custom) Palette(wantDark bool) Palette + type Option struct + Dark bool + Family string + ID string + Label string + Variant string + func Find(id string) (Option, bool) + type Palette struct + Dark bool + Family string + ID string + Name string + Tokens Tokens + func BuiltinPalette(id string) (Palette, error) + func Resolve(sel Selection, systemDark bool, customDir string) (Palette, error) + func (p *Palette) ApplyTweaks(tweaks map[string]string) + type RGB struct + B uint8 + G uint8 + R uint8 + func EnsureContrast(fg, bg, anchor RGB, ratio float64) RGB + func Mix(a, b RGB, t float64) RGB + func ParseColor(input string) (RGB, bool) + func (c RGB) Hex() string + type Selection struct + Family string + ID string + Mode string + func Select(name string, current Selection, customDir string) (Selection, error) + type Tokens struct + Accent RGB + AccentMuted RGB + AccentSoft RGB + Aqua RGB + Bg RGB + Bg1 RGB + Bg2 RGB + Bg3 RGB + Bg4 RGB + BgSofter RGB + Blue RGB + Fg RGB + Fg1 RGB + Fg2 RGB + Green RGB + Grey0 RGB + Grey1 RGB + Grey2 RGB + GreyDim RGB + Purple RGB + Red RGB + Yellow RGB