Skip to content

Color and color vision

Pick categorical, sequential or diverging palettes, avoid rainbow scales, and check your chart for color-vision deficiency.

Introductory ~9 min7 steps

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

01

Three kinds of palette

Read
DataPaletteExample
Unordered groupsCategorical: distinct huesspecies
Ordered amountsSequential: one hue, light to darkpopulation density
Above or below a midpointDiverging: two hues around a neutralchange from last year

Use a diverging palette only when the middle means something, such as zero change.

02

Which colors can't people tell apart?

Predict

Predict 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?

Red and greenBlue and orangeBlack and white
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.

03

Check your chart

In the app

In 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.

Matrix heatmapWhat do the values of a square or rectangular result matrix look like at a glance?
View data
variablewithr
ageage1
ageBMI0.1207
agesystolic BP0.1471
agecholesterol0.1467
ageglucose0.1912
ageactivity−0.1247
BMIage0.1207
BMIBMI1
BMIsystolic BP0.3132
BMIcholesterol0.3194
BMIglucose0.3629
BMIactivity−0.1770
systolic BPage0.1471
systolic BPBMI0.3132
systolic BPsystolic BP1
systolic BPcholesterol0.4537
systolic BPglucose0.5647
systolic BPactivity−0.3672
cholesterolage0.1467
cholesterolBMI0.3194
cholesterolsystolic BP0.4537
cholesterolcholesterol1
cholesterolglucose0.6006
cholesterolactivity−0.3861
glucoseage0.1912
glucoseBMI0.3629
glucosesystolic BP0.5647
glucosecholesterol0.6006
glucoseglucose1
glucoseactivity−0.4105
activityage−0.1247
activityBMI−0.1770
activitysystolic BP−0.3672
activitycholesterol−0.3861
activityglucose−0.4105
activityactivity1
04

Rainbow scales

Read

A 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.

05

Fewer is better

Reflect

Most 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?

06

Check your understanding

Checkpoint

Check 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.

07

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