Foundations
The three layers of tokens, from colour scales to purpose roles to each target's output.
Tokens come in three layers, each generated from the one before:
- Inputs. A theme’s background and accent, or a palette for an optional theme, plus its style.
- Purpose roles. What a colour is for, named in Home Assistant’s pattern so moving onto Home Assistant’s own tokens later is a rename:
--gw-color-text-primary,--gw-color-surface-low,--gw-color-border-quiet,--gw-color-fill-accent-resting. - Target outputs. CSS variables, JSON, TypeScript, QML, OpenTUI colours and ANSI mappings.
Every token starts with --gw-, for Groundwork, and every element with gw-. Set a theme and mode with data-gw-theme and data-gw-mode.