Color in Charts and Data Visualization
Choose sequential, diverging and categorical palettes for charts, avoid the rainbow trap, and make data colors readable for everyone.
Welcome back!
Step 1 of 12Learn
Color has a job in charts
In a chart, color is not decoration. It encodes data, and the wrong palette can make a chart misleading or unreadable. Before choosing colors, ask what kind of data you are showing.
There are three main palette types:
- Sequential: one hue (or a smooth blend) running from light to dark, for ordered values from low to high, such as population density, temperature in one direction, or sales volume. Darker usually means more.
- Diverging: two contrasting hues meeting at a neutral midpoint, for data with a meaningful center, such as above or below average, gains and losses, or survey answers from "strongly disagree" to "strongly agree."
- Categorical (qualitative): distinct hues with similar lightness and saturation, for categories with no order, such as product lines, countries or departments.
Using the wrong type causes real errors. A categorical rainbow on ordered data hides the order: is yellow more than green? A sequential palette on unordered categories implies a ranking that does not exist. A diverging palette on data without a meaningful midpoint invents one.
The simplest rule: ordered data gets ordered colors (lightness steps); unordered data gets distinct hues.
Step 2 of 12Compare
Three palette types for data
| Aspect | Sequential | Diverging | Categorical |
|---|---|---|---|
| Data | Ordered, low to high | Ordered, with a meaningful middle | Separate groups, no order |
| Example | Population density | Change from last year | Product lines |
| Color design | One hue, light to dark | Two hues meeting at a neutral | Distinct hues, similar lightness |
Step 3 of 12Practice · Sort into groups
Which palette type fits each dataset?
Tap an item, then tap its group (or drag it there).
Step 4 of 12Learn
The rainbow trap
For decades, many scientific charts and weather maps used a rainbow color scale: violet, blue, green, yellow, orange, red. It looks vivid, but research in visualization has shown that it causes problems:
- It is not perceptually ordered. People do not naturally rank green above blue or orange above yellow, so readers must check the legend constantly.
- It creates false boundaries. The bright yellow band appears as a sharp edge in the data even where values change smoothly, and some ranges (the greens) look flat while others jump.
- It fails for color vision deficiency. Red and green regions can become indistinguishable.
- It falls apart in grayscale. Yellow and light green print as similar grays, and red and blue as similar darker grays.
Better choices are perceptually uniform palettes, in which equal steps in data look like equal steps in color, usually by changing lightness steadily. Several well-tested sequential palettes, designed to be friendly to color vision deficiency and readable in grayscale, are built into common charting and data tools. Many science organizations and publications now recommend them over rainbows.
If you must show many distinct levels, consider fewer, labeled classes (for example five shades from light to dark) rather than a smooth rainbow.
Step 5 of 12Practice · Diagram
A diverging scale for temperature anomaly
Which marker should get the lightest, most neutral color?
Tap the shape that answers the question, then press Check.
- Dark blue
Much colder than average.
- Light gray
No change: the meaningful midpoint gets the most neutral color.
- Dark red
Much warmer than average.
Step 6 of 12Practice · True or false
A rainbow color scale is usually the clearest way to show values that increase smoothly from low to high.
Step 7 of 12Learn
Practical rules for chart color
A few habits make charts clearer immediately:
- Start gray, then highlight. Draw all data in a neutral gray, then color only the series or bar you want readers to notice. "Our company" in brand blue among gray competitors tells the story instantly.
- Limit categories. Most people can reliably tell apart around six to eight categorical colors. With more, group small categories into "Other" or use small multiples (several small charts).
- Keep lightness similar for categories so no category looks more important by accident, and vary lightness for sequences so order is obvious.
- Label directly. Put labels next to lines and bars instead of relying on a separate legend; it reduces eye travel and helps readers who cannot match colors.
- Use conventions with care. Red for losses and green for gains is familiar in many Western finance contexts, but problematic for red-green CVD, and reversed in some markets. Add plus and minus signs or arrows.
- Keep colors consistent across charts. If "Europe" is teal in the first chart, keep it teal in every chart of the report.
- Check contrast for marks: lines and small markers should have at least 3:1 contrast with the background.
Good chart color is quiet. When readers notice the palette more than the data, something has gone wrong.
Step 8 of 12Note
Step 9 of 12Chart
Guest satisfaction: start gray, then highlight
Step 10 of 12Practice · Select all that apply
Which changes would make a line chart with nine colored lines and a legend easier to read? Select all that apply.
Select all that apply.
Step 11 of 12Note
Step 12 of 12Practice · Choose one
A map shows the percentage change in population since the last census, from −15% to +20%. Which palette fits best?
Lesson complete!