Repository navigation
Conversation
- Add 12 series colours per mode as --ds-chart-* tokens, with channel variants and fill opacities (area, band, data, region and label states) - Add tools/chart-palette, which generates the tokens from palette.mjs and gates the build on contrast, colour-vision separation, hue and marker checks - Add a test that fails on stale output or a failed check
- Export the palette as chart-palette.json: colours, channels, simulated colour-vision values, thresholds, opacities, marker sizes and slots near status colours - Generate validation.md with contrast, colour-vision, greyscale and status-colour figures - Include both in the build and stale-output check
- Generate render-check.html: charts, bars, scatter, regions on an image and labels in both modes - Add switches for mode, series order, colour-vision simulation and series count - Add seeded sample data that the preview and the docs page share - Write the page locally on build and ignore it, so it is not committed or checked
- Import DiamondDSChartTokens.css from DiamondDSTheme so consumers get the --ds-chart-* tokens with the theme - Add the chart palette to the changelog
- Add Foundations/Chart Colours with the swatches, example line and scatter charts, colour-vision simulation, usage rules, region and label states, and the token table - Read the colours, thresholds, sample data and marker shapes from tools/chart-palette so the page follows the generator - Add the page styles to storybook.css and list the page last under Foundations
zoharma
force-pushed
the
zma/chart-palette
branch
from
October 30, 2026 13:33
c74dc12 to
9818c10
Compare
Contributor
Author
Screen.Recording.2026-10-30.at.13.34.24.mp4Screen.Recording.2026-10-30.at.13.48.10.mp4 |
- Change light slots 1, 4 and 5 so each pair is at least ΔE 21 apart (was 15.7) - Keep indigo lighter than sepia (L* 7 apart) so the two don't merge in greyscale - Regenerate tokens, JSON and validation report
- Add a colour box above each slot on the Chart Colours page, in light and dark - Label each swatch with its hex value for that mode
zoharma
force-pushed
the
zma/chart-palette
branch
from
November 3, 2026 15:56
120d250 to
d50a038
Compare
Contributor
Author
- Add vision, show (lines, markers or both), series count, line width, cycle size, per-cycle line style and gap controls to render-check.html and the Chart Colours page - Cycle the colours in sets of 8 or 12, with solid, dashed and dotted lines per cycle; gaps in a broken line take the colour half way to the surface - Build the Chart Colours controls with MUI and drop its scatter example - Style render-check.html with the DiamondDS tokens
Contributor
Author
|
- Slot 3 is now wine (#610c12 light, #ffebeb dark), still the darkest colour in light and the lightest in dark - Drop the neutral-slot gate; every slot now needs chroma of at least 0.02 in both modes, and hue identity applies to all 12 - Regenerate tokens, JSON and validation report
zoharma
force-pushed
the
zma/chart-palette
branch
from
November 4, 2026 14:07
ffced40 to
8d4ae6f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds a categorical chart palette to DiamondDS: 12 series colours per mode (8 core, 4 additional), each paired with a marker shape so series can be told apart without colour.
--ds-chart-Ntokens, with-channelvariants and fill opacities. Loaded with the DiamondDS theme.tools/chart-palette/.palette.mjsis the source of truth. The CSS, JSON export and validation report are generated from it.Light
Dark
What is checked
node tools/chart-palette/build.mjs --checkfails if the generated files are stale. The validator gates, in both modes:--ds-on-surfacelabel text keeps ≥ 4.5:1 on series-coloured tints.Commits
Split by function, so each can be reviewed or reverted on its own:
Each of the first three passes
build.mjs --checkon its own.Research
Sources
Evaluation
Every palette was measured with the same tool. "CVD" is the smallest ΔE between any two colours under protan, deutan or tritan. Contrast is the lowest of any colour on the DiamondDS chart surface and page background in that mode. Single-set palettes are tested on both the light and dark surfaces. Carbon and DiamondDS use their own light and dark sets.
What this shows:
validation.md.Known limits
Recorded in
validation.md, not gated:Test plan
node tools/chart-palette/build.mjs --checkexits 0node tools/chart-palette/build.mjs, then opentools/chart-palette/render-check.html(gitignored, written locally) and check the palette preview in light and darkpnpm vitest run tools/chart-palettepnpm lint