Yan Holtz logo ← All issues
Dataviz Universe

Design with intent

These days, Cédric Scherer and I are writing the lessons about color for our ggplot2 Uncharted project. It's a big work!

The main message of the lesson is something crucial:

Great visualizations don't use color just for decoration: they use it with intent.

There are only three valid reasons to use color.
Let's review them!

1️⃣ Colors to represent values

Use color to encode data in a perceptually linear way.

The goal: emphasize one end of a range (sequential palette) or both ends (diverging palette).

That's the case for a heatmap for instance! Without colors, no more meaning. So color is crucial here.

Measles vaccine effect heatmap

One of the most famous heatmap example. Shows the vaccine effect on Measles. D3 code.

2️⃣ Colors to distinguish groups

Use color to separate categories that have no intrinsic order.

Each color should have similar visual weight so that all groups are shown equally (qualitative palette).

Chart with one color per continent

Here, each continent (group) is encoded with its own color. ggplot2 lesson & code.

3️⃣ Emphasize information

That's the one everyone forgets doing!

Use color to draw attention to what matters most: a specific group, range, or threshold.

Highlight colors work best when the rest of the chart is kept subtle and desaturated.

Faceted chart with color highlight per panel

Roy Debatreyo (a student of my Matplotlib journey project) used a technique I love here: faceting + color highlight on each panel.

⚠️ A few exceptions

That's dataviz! There are rare cases where breaking the rule can make sense:

That's it for today!

Next time you add colors to a chart, check if they fit one of these three goals.
If not: remove them.

PS: In case you missed it, I built a tool to help you create a beautiful homepage in just a few minutes.


See you next week,
Yan

Enjoyed this?

Get one short, actionable dataviz tip every Saturday. Join 19,000+ data people.