While visually appealing (harmonious) color palettes are easy to come by these days, finding the right color palette for data visualizations is challenging. Things are made more difficult, as we need to convey information across thousands of unique data sets in many different types of visualization layouts. And then there are issues like accessibility, enough colors and enough distinctiveness.
7wData did some research on this and came up with these three rules for selecting your color pallet:
Rule 1: Have a wide range in both hue and brightness
To make sure color palettes are accessible and easy to distinguish, they must vary enough in brightness. Differences in brightness are universal. Take any monochromatic color palette and test how it looks in Protanopia, Deuteranopia, and grayscale mode. You’ll quickly be able to tell how accessible this palette is.
However, having a palette that varies only in brightness may not be enough. The more variance you can have in the color palette, the easier it is for users to map your data series to the visualization. If we can utilize the change in hue for people who are not color blind, it will delight them even more.
And for both the brightness and the hue, the wider range you can find, the more data series you can support.
Rule 2: Follow natural patterns of color
There’s a secret that designers know which is not always immediately intuitive to left-brained folks: Not all colors are created equal.
From a purely mathematical standpoint, a color progression that transitions from light purple to dark yellow should feel roughly similar to a transition from light yellow to dark purple. But light yellow to dark purple feels natural then light purple to dark yellow.
This is because we’ve been conditioned by gradients that consistently appear in nature. We see bright yellow transition into dark purple in gorgeous sunsets, but there’s really no place on earth where you can see a light purple transition into a dark brownish yellow.
Similarly, a light green to a purplish blue, a light yellow to dark green, an orangey brown to cold gray, and more. Because we see these natural gradients all the time, they feel familiar and pleasant when we see a corresponding palette used in a visualization.
Rule 3: Use a gradient instead of choosing a static set of colors
Gradient palettes that incorporate different hues offer the best of both worlds. Whether you need 2 colors or 10 colors, colors can be strategically extracted from these gradients to produce a visualization that feels natural, but also has enough variation in hue and brightness.
It’s not easy to switch to a gradient mindset, but a good way to start is by setting up grid lines at the breakpoints for each number of data series and constantly testing the gradient and making tweaks.
Place your color palettes at the top against a grayscale, tweak the gradient overlays (so you can get the exact transition code later), and select colors from those breakpoints to test how the palette would work in real life.
If you understand the RGB hexadecimal system then you can mathematically determine colors that have a 10% difference for a 10-color scale or 20% difference for a 5-color scale, etc.
So the next time you are using color to convey information with your data, please remember these rules and consider the meaning of color and your customers will appreciate it.