Skip to content

Colorblind-safe chart palette - #21

Merged
GusFurtado merged 1 commit into
mainfrom
colorblind-safe-palette
Sep 12, 2026
Merged

GusFurtado merged 1 commit into
mainfrom
colorblind-safe-palette

Conversation

@GusFurtado

Copy link
Copy Markdown
Collaborator

Context

Direct answer to "aren't there extra colors in outliers-design-system?": no — checked the canonical theme-tokens.css mirror, and chart.seriesA/B/C are teal/navy/cyan (one hue family, varying mostly in lightness), plus a neutral "other" and two correlation-heatmap endpoints. That's the design system's own definition, not something missed here — and being brand-derived, it was never going to have the hue range this needs. More brand tints would still be teal/navy variants, which is exactly what's hard to distinguish under color vision deficiency (hue matters far less there than lightness/saturation, and this palette varied almost entirely in the latter).

What changed

Replaced CHART_PALETTE with an actual qualitative palette instead of brand tints:

  • The first 8 colors are Okabe & Ito's colorblind-safe set (Wong, Nature Methods 8, 441 (2011) — the standard reference for categorical color under deuteranopia/protanopia/tritanopia), with their yellow darkened from #F0E442 to #B8860B for legibility on our white background (the original assumes a darker plot background).
  • 4 more well-separated hues extend it past 8.

Every place this palette is used (frontier per-asset dots, allocation donut/table, per-asset statistics) also labels the point with the ticker symbol as text — color is always a secondary cue, never the only one, which matters once a selection goes past the ~8–10 hues anyone can reliably tell apart by color alone.

Single source of truth (CHART_PALETTE, indexed via CHART_PALETTE[k % CHART_PALETTE.length]), so this was the only place that needed to change.

Verification

Re-rendered the frontier, allocation, and per-asset-statistics sections with a synthetic 10-asset response — every series swatch (dots, donut arcs, table swatches) is now visually distinct, versus the previous palette's mostly-indistinguishable teal/navy/gray shades. Screenshot in this PR's discussion if useful.

🤖 Generated with Claude Code

Answering the question directly: outliers-design-system's chart
tokens don't actually offer more than this (checked the canonical
theme-tokens.css mirror) — chart.seriesA/B/C are teal/navy/cyan (one
hue family, varying lightness) plus a neutral "other" and two
correlation-heatmap endpoints. That's not an oversight in this app,
it's what the design system itself defines, and being brand-derived
it was never going to have the hue range this needs — more brand
tints would still be teal/navy variants, which is exactly what's hard
to tell apart under color vision deficiency (hue is far less reliable
than lightness/saturation there).

Replaced CHART_PALETTE with a real qualitative palette instead of
brand tints: the first 8 colors are Okabe & Ito's colorblind-safe set
(Wong, Nature Methods 8, 441 (2011) — the standard reference for
categorical color under deuteranopia/protanopia/tritanopia), yellow
darkened from their #F0E442 to #B8860B for legibility on our white
background, plus 4 more well-separated hues to extend past 8. Every
place this palette is used (frontier per-asset dots, allocation
donut/table, per-asset statistics) also labels the point with the
ticker symbol as text, so color is always a secondary cue, never the
only one — which matters once a selection goes past the ~8-10 hues
anyone can reliably tell apart by color alone, colorblind or not.

Single source of truth (CHART_PALETTE, indexed by position via
`CHART_PALETTE[k % CHART_PALETTE.length]`), so this is the only place
that needed to change — verified by re-rendering the frontier,
allocation and per-asset-statistics sections with a synthetic 10-asset
response and confirming every series swatch is now visually distinct.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@GusFurtado
GusFurtado force-pushed the colorblind-safe-palette branch from 6b69264 to a7065d9 Compare September 12, 2026 00:51
@GusFurtado
GusFurtado changed the base branch from remove-curated-chips to main September 12, 2026 00:51
@GusFurtado
GusFurtado merged commit 518eaeb into main Sep 12, 2026
10 checks passed
@GusFurtado
GusFurtado deleted the colorblind-safe-palette branch September 12, 2026 01:02
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