Generate chart palettes with the three shapes data actually needs: categorical (distinct series), sequential (low-to-high) and diverging (around a midpoint) — built in OKLCH, previewed in grayscale, and stress-tested with a deuteranopia check that reports the weakest series pair.
Settings
Generated locally in your browser — your settings and results never leave this page.
Chart color is encoding, not decoration
In interface design, color choices are aesthetic; in charts they are semantic — color literally carries the data. That flips the design criteria: distinctness beats beauty for categories, perceptual ordering beats vibrancy for sequences, and a miscalibrated palette does not merely look off, it misinforms. The generator builds the three canonical encodings with those criteria enforced by construction, then stress-tests the result the way charts are actually consumed: in grayscale, and under color-vision deficiency.
Three shapes for three data shapes
Categorical (unordered groups): maximally-spread OKLCH hues with alternating lightness — the alternation is the quiet hero, giving adjacent series a second distinguishing channel that survives both printing and deuteranopia. Sequential (ordered magnitude): one hue with strictly monotonic lightness, enforced in tests, because “darker means more” is decoded pre-attentively and any non-monotonic step breaks the read. Diverging (midpoint data): two opposed hues meeting at genuine neutral — the midpoint’s neutrality is semantic, marking “zero” without bias toward either pole.
The stress tests, justified
The grayscale strip answers for every value-only context: laser printouts, e-ink, projectors in daylight, total color deficiency. The deuteranopia score (weakest simulated pair, printed for categorical palettes) answers for the largest CVD population — a low score is an instruction to reduce series count or adopt the CVD-safe generator’s stricter optimization. Palettes that pass both tests fail quietly nowhere.
Shipping into charting libraries
The JSON export is an ordered array — the shape every charting library’s color option expects — and order is load-bearing: adjacent-series contrast was optimized in sequence, so shuffling forfeits it. Series count beyond eight is a structure problem no palette solves (small multiples, direct labeling, aggregation are the real fixes). For heat-scale needs between two brand colors specifically, the Gradient Palette Generator shares this tool’s perceptual guarantees.
The legend-load heuristic
A palette’s real ceiling shows in legend dependence: if readers must consult the legend for every data point, the encoding has failed regardless of how distinguishable the colors technically are. The practical audit — cover the legend and ask what can still be read. Well-built categorical palettes at five series survive; at nine, nothing does, and the fix is structural. Sequential and diverging palettes dodge the problem entirely by being self-explanatory (darker is more; red side versus blue side), which is an underrated argument for reshaping categorical questions into ordered ones where the data allows.
How to use the Data Visualization Palette Generator
- Pick the palette type – categorical, sequential or diverging – and the anchor color.
- Set the count; review the grayscale strip and (for categorical) the deutan score.
- Export for your charting library.
Frequently asked questions
Which palette type does my chart need?
By data shape: categorical for unordered series (products, regions) – distinct hues; sequential for ordered magnitude (low→high) – one hue ramping in lightness; diverging for values around a meaningful midpoint (profit/loss, above/below average) – two hues meeting at neutral. Choosing wrong type is the most common chart-color mistake and no palette fixes it.
What makes the categorical palettes distinguishable?
Evenly spread OKLCH hues at controlled chroma, with alternating lightness so adjacent series differ by two channels – then a deuteranopia stress test reporting the weakest pair. If that score is low, fewer series or the CVD-safe generator is the honest next step.
Why must a sequential palette be monotonic in lightness?
Because readers decode "darker = more" preattentively – lightness is the perceptual axis that encodes order. The generator enforces strictly falling luminance (tested in CI), which also guarantees the ramp survives grayscale printing intact.
Where should the neutral sit in a diverging palette?
Exactly at your data's meaningful midpoint – zero, the average, the target – and it should be genuinely neutral (the generator uses a near-white) so neither side inherits emphasis. An off-center or tinted midpoint quietly biases the chart.
What does the grayscale strip prove?
That your palette survives value-only reproduction: printed handouts, e-ink, projectors dying in daylight, and readers with total color deficiency. Sequential and diverging palettes must stay ordered in it; categorical ones should keep at least alternating steps distinct.
How many colors before a categorical palette fails?
Six is comfortable, eight the practical ceiling with this generator's lightness alternation – beyond that even normal vision starts consulting the legend per point. More categories than that want small multiples, direct labeling or aggregation, not more hues.
Can I feed these palettes to Chart.js, ECharts or d3?
The JSON export is an ordered array ready for any library's color list, and the CSS variables version suits chart libraries that read custom properties. Series order matters – the palettes are ordered for adjacency contrast, so keep the sequence.