Skip to content

color system spike: generator, migration map, validation (not shipped) - #70

Closed
dreamwasp wants to merge 1 commit into
cass-gmt-1825-color-systemfrom
cass-gmt-1825-color-spike
Closed

dreamwasp wants to merge 1 commit into
cass-gmt-1825-color-systemfrom
cass-gmt-1825-color-spike

Conversation

@dreamwasp

Copy link
Copy Markdown
Contributor

Summary

The color generator from #50, split out as a supplementary spike. It is not shipped API, and nothing on the runtime path imports it. Merging this would add build tooling, not runtime code.

Contents (the diff against cass-gmt-1825-color-system is this tree):

  • packages/gamut-styles/src/colorSystem/: the generator. Brand hues in, palette (8 slots × 11 grades) and 43 roles × 2 modes out. Includes migration.ts (design's old → new map), probe.ts (tenant probe), contentModes.ts, and validate.ts.
  • packages/gamut-styles/scripts/build-tokens.ts and validate-tokens.ts: build:tokens and validate:tokens, run with jiti.
  • colorSystem/__fixtures__/sandbox-dffd84b.json: design's sandbox dump the parity check uses.
  • The build-only dependencies (culori, jiti, style-dictionary) that feat(gamut-styles)!: generated color system with tokens.css as the color contract #50 dropped.

Why a spike

cass-gmt-1825-color-system (#50) ships the generated output under src/tokens/generated/, and that is what the runtime needs. The generator itself is tooling. Per the stack notes, it moves to @skillsoft/gamut-brand in #66, which is the intended home. This PR keeps the working generator in one place for review and for regenerating the output.

Testing instructions

  1. git fetch && git checkout cass-gmt-1825-color-spike && yarn
  2. yarn workspace @skillsoft/gamut-styles build:tokens regenerates src/tokens/generated/. The output should match what feat(gamut-styles)!: generated color system with tokens.css as the color contract #50 has committed.
  3. yarn workspace @skillsoft/gamut-styles validate:tokens runs the parity check (88 rungs, every role) and the contrast guarantees.
  4. Storybook, theme toolbar → Skillsoft (color spike), which reads the generated tokens.css.

The generated header comments still say scripts/build-tokens.ts. The script is on this branch, not on #50.

🤖 Generated with Claude Code

@dreamwasp

Copy link
Copy Markdown
Contributor Author

Closing: the generator stays on cass-gmt-1825-color-system (#50), because the brand inputs (skillsoft, originalCodecademy, admin, platform, lxStudio) and the stacked PRs depend on it. The long-term home is @skillsoft/gamut-brand in #66. This branch now has no diff against #50.

@dreamwasp dreamwasp closed this Nov 9, 2026
@dreamwasp
dreamwasp deleted the cass-gmt-1825-color-spike branch November 10, 2026 15:30
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.

1 participant