Skip to content

feat(tokens): export palette as brand.css + brand.json#37

Merged
IamMrCupp merged 1 commit into
mainfrom
feat/color-tokens-export
Jun 2, 2026
Merged

feat(tokens): export palette as brand.css + brand.json#37
IamMrCupp merged 1 commit into
mainfrom
feat/color-tokens-export

Conversation

@IamMrCupp

Copy link
Copy Markdown
Member

Closes #27. Part of #26 (Phase 3 — extension).

Downstream consumers were hand-copying the palette: the website duplicates all five spectrum hexes in global.css with a "do not approximate" comment, and the hardware render/CAD scripts hardcode #00d4c8/#ffb020. A copy with no machine link drifts the moment a hex changes in brand.toml.

This adds a tokens build target that emits the palette straight from [colors.*] — one source, two consumable forms:

  • tokens/brand.css:root custom properties (--ap-highs, --ap-ink, …) plus semantic aliases (--ap-primary-accent: var(--ap-mid-highs)).
  • tokens/brand.json — structured spectrum / neutrals / semantics, hexes verbatim.

New [tokens] section in brand.toml (just the CSS prefix), a write_tokens() in build.py, a make tokens target, and the CI drift gate extended to cover tokens/ alongside logos/ — so the export can't rot out of sync with the palette.

No logo assets changed; rebuild is byte-identical.

Signed-off-by: Aaron Cupp <mrcupp@mrcupp.com>
@IamMrCupp IamMrCupp merged commit 137a045 into main Jun 2, 2026
1 check passed
@IamMrCupp IamMrCupp deleted the feat/color-tokens-export branch June 2, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A.2 — color tokens export (brand.css + brand.json)

1 participant