color/colors.jpg

How to Pick Colors for Your Data Visualizations

Position is everything, color is difficult - Moritz Stefaner

Choosing colors for a data visualization is hard. Do it wrong, and it can lead to confusion and misinterpretation.

Color can seem like a purely decorative attribute of a data visualization. Picking colors may seem like a totally subjective matter.

It isn’t. It’s a skill that you can get better at.

What makes color hard

Colors are often misinterpreted. Colors can have different associations in different cultures. In the U.S. the color red is associated with danger, warnings, and errors. In China, red symbolizes prosperity and luck.

Colors can be hard to distinguish from one another. If you have colors of similar hue, it can be difficult to tell them apart. In addition, you might prevent those who are color blind from understanding what you are communicating.

Use color sparingly, and try to discover creative methods of differentiating or grouping elements. Positioning elements is often a better way of doing this.

Finding Good Color Palettes

There are lots of good color palette generators. Here are a few that i’ve used:

  1. Color Brewer
  2. Adobe Color
  3. lolcolors
  4. Colorhunt

I especially want to highlight Color Brewer. It’s a fantastic resource that allows you to use up to 12 colors from each palette. Many of the beautiful D3.js choropleth maps use Color Brewer.

Photo of Color Brewer

If you’re interested in exploring these concepts further, there’s a lesson in my D3.js course on design principles. In the lesson, I cover how to use color and typography in your data visualizations.

If you’re interested in learning D3.js, you can learn more about the course here.