Color in Data Visualization: Palettes That Don't Mislead
In charts, color is data. The wrong palette doesn't just look bad — it tells readers things the numbers never said. Three palette types cover almost every chart; the craft is picking the right one and leaving it alone.
Categorical: for kinds of things
Product lines, regions, user segments. Colors must look different without implying order — so vary hue, keep lightness and saturation roughly even, and stop at six or seven before readers lose track. Grouping extras into 'other' beats a twelfth color every time.
Sequential: for how much
Revenue, density, temperature. One hue running light to dark, where darker means more. Generate it like a Tailwind scale — perceptually even steps — or your map will show a cliff where the data has a slope.
Diverging: for above or below
Profit vs loss, hotter vs colder than average. Two sequential ramps meeting at a neutral midpoint. The midpoint must sit at the meaningful zero of your data, not the middle of its range — this is the most common way diverging charts mislead.
Color-blind safety in two moves
- Never encode meaning in red vs green alone — about 1 in 12 men can't separate them. Red vs blue, or orange vs blue, survives every common deficiency.
- Double-encode anything critical: color plus a label, shape or pattern. If the chart still works in grayscale, it works for everyone.
And the classic mistakes
Rainbow scales for sequential data (hue order isn't magnitude order), a saturated highlight color on every bar (highlight one, mute the rest), and reusing your brand accent as a data color so readers can't tell decoration from meaning. Reserve one color for emphasis and let the rest of the chart stay quiet.
Sources and further reading
- Understanding Success Criterion 1.4.1: Use of Color · W3C Web Accessibility Initiative
- Understanding Success Criterion 1.4.11: Non-text Contrast · W3C Web Accessibility Initiative