Color and color vision
Pick categorical, sequential or diverging palettes, avoid rainbow scales, and check your chart for color-vision deficiency.
You will be able to
- Match a palette type to the data
- Explain why rainbow scales mislead
- Check a chart with the color vision control
Read first
Three kinds of palette
Read| Data | Palette | Example |
|---|---|---|
| Unordered groups | Categorical: distinct hues | species |
| Ordered amounts | Sequential: one hue, light to dark | population density |
| Above or below a midpoint | Diverging: two hues around a neutral | change from last year |
Use a diverging palette only when the middle means something, such as zero change.
Which colors can't people tell apart?
PredictPredict first
About 1 in 12 men and 1 in 200 women have a color-vision deficiency. Which pair is the most likely to look alike to them?
Reveal
The answer: Red and green
Red and green, in the most common forms. Good/bad in red/green is the classic trap. Blue and orange is a safer pair.
Check your chart
In the appIn Charts, open a chart and use the color vision menu above it to simulate the common deficiencies. See whether you can still tell the groups apart.
View data
| variable | with | r |
|---|---|---|
| age | age | 1 |
| age | BMI | 0.1207 |
| age | systolic BP | 0.1471 |
| age | cholesterol | 0.1467 |
| age | glucose | 0.1912 |
| age | activity | −0.1247 |
| BMI | age | 0.1207 |
| BMI | BMI | 1 |
| BMI | systolic BP | 0.3132 |
| BMI | cholesterol | 0.3194 |
| BMI | glucose | 0.3629 |
| BMI | activity | −0.1770 |
| systolic BP | age | 0.1471 |
| systolic BP | BMI | 0.3132 |
| systolic BP | systolic BP | 1 |
| systolic BP | cholesterol | 0.4537 |
| systolic BP | glucose | 0.5647 |
| systolic BP | activity | −0.3672 |
| cholesterol | age | 0.1467 |
| cholesterol | BMI | 0.3194 |
| cholesterol | systolic BP | 0.4537 |
| cholesterol | cholesterol | 1 |
| cholesterol | glucose | 0.6006 |
| cholesterol | activity | −0.3861 |
| glucose | age | 0.1912 |
| glucose | BMI | 0.3629 |
| glucose | systolic BP | 0.5647 |
| glucose | cholesterol | 0.6006 |
| glucose | glucose | 1 |
| glucose | activity | −0.4105 |
| activity | age | −0.1247 |
| activity | BMI | −0.1770 |
| activity | systolic BP | −0.3672 |
| activity | cholesterol | −0.3861 |
| activity | glucose | −0.4105 |
| activity | activity | 1 |
Rainbow scales
ReadA rainbow scale has no perceptual order. Yellow looks brightest in the middle, so it creates bands and boundaries that aren't in the data. It also fails in grayscale and for many readers with color-vision deficiency.
Use a scale whose lightness changes steadily, so light-to-dark matches low-to-high.
Fewer is better
ReflectMost people can follow about six or seven categorical colors. Beyond that, readers keep going back to the legend.
So label lines directly, group the rest in gray and highlight the one you want read. Look at your last chart with many colors: which one group is the story?
Check your understanding
CheckpointCheck yourself
You're mapping the change in unemployment since last year, with values above and below zero. Which palette?
Show the answer
Answer: a
Direction from a meaningful midpoint is exactly what a diverging palette shows.
Check yourself
What is the main problem with a rainbow scale on a heatmap?
Show the answer
Answer: b
Equal steps in the data don't look like equal steps in a rainbow.
Check yourself
Your line chart separates four lines by color alone. What's the best way to make it accessible?
Show the answer
Answer: b
Redundant encoding works for everyone. Brighter colors don't help if the hues can't be told apart.
Recap
Recap- Match the palette to the data: categorical, sequential or diverging.
- Avoid rainbow scales, and red against green.
- Check with the color vision control, and don't rely on color alone.
Concepts in this lesson