Expand description
Colour and style resolution for readout body grammar (SRD-63 §5.2).
Three accept-shapes:
- Direct colour names — uppercase tokens like
RED,BLUE,BRIGHT_GREEN,DIM. Map to ANSI SGR codes directly. - Hex —
#RRGGBBor#RGB. Map to ANSI truecolor (\x1b[38;2;r;g;bm). - Style names — semantic, palette-resolved tokens
like
ERROR,WARN,INFO,OK,HEADER,MUTED. Resolve through the active palette (defaultWONG). Mapping is consistent across surfaces — the sameERRORstyle produces the same visual emphasis whether it lands in a readout, a plot legend (SRD-46), or a TUI panel.
Enums§
- Color
Spec - Parsed colour or style spec. Carries enough information to produce an ANSI escape on demand without re-parsing.
- Palette
- Active palette. Default is
Wong(colorblind-safe); matches the palette name SRD-46 reports default to. - Style
Name - Semantic style names. Each maps to a palette entry per
the active palette (default
WONG); operators / future workloads can swap palettes.