Data Visualization Color
Charts need three kinds of palette, and the choice between them is determined by the data, not by taste.
Definition
Data visualisation uses categorical palettes for unordered groups, sequential palettes for ordered magnitude, and diverging palettes for values around a meaningful midpoint. Using the wrong type misrepresents the data.
Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.
On this page
Palette types
| Type | Data | Construction |
|---|---|---|
| Categorical | Unordered groups such as regions or products | Distinct hues at similar but not identical lightness. Cap at around 7 series. |
| Sequential | Ordered magnitude such as revenue or density | One hue, stepping lightness. Light equals low by convention. |
| Diverging | Values around a meaningful centre such as change versus target | Two hues meeting at a neutral midpoint. The midpoint must be meaningful. |
Rules that prevent misreading
- Never use a rainbow palette for sequential data. It creates false boundaries where the hue changes fastest and is not perceptually ordered.
- Cap categorical series at around seven. Beyond that, group the tail into an 'other' category or change the chart type.
- Keep a series the same colour across every chart in a product. Inconsistent series colour is a reliable source of misreading.
- Reserve a dedicated colour for the highlighted or selected series, and grey the rest.
- Label directly where possible, which removes the legend lookup entirely.
- Include a pattern or texture option for print and for monochrome output.
In practice
Retiring rainbow scales
Scientific and analytics toolsPerceptually uniform sequential scales such as viridis replaced rainbow scales in scientific visualisation because rainbow creates artificial banding that readers interpret as structure in the data.
Grey the context, colour the subject
DashboardsShowing all series in grey and colouring only the one being discussed makes a dense chart readable and removes the legend from the critical path.
Sources
Where a source establishes something narrower than the popular reading of it, the note says so.
The Visual Display of Quantitative Information
E. Tufte, Graphics Press, 1983
ColorBrewer: color advice for maps
C. Brewer, Pennsylvania State University
Well-tested categorical, sequential and diverging palettes with colour-blind-safe options.
Continue from here
Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.
Applies when you are designing
Check your work
Review passes that test whether this was done properly.
- Dashboard UX ChecklistChecklist
Short definition
The one-paragraph version, for when that is all you need.
Related concept
Connected closely enough to change how you apply this.
- Use of ColorAccessibility
- Color AccessibilityUI foundation
- Color Theory for InterfacesUI foundation
- ContinuityUI foundation
- ContrastUI foundation
- HueUI foundation
- Semantic ColorUI foundation