Color Palette Selection

I was wondering if there are certain points to consider when chosing a color palette to visualize data. It seems obvious that certain colors are associated with certain variables (e.g. hot usually goes with red, and cold with blue…). The only thing I could find so far is the difference between qualitative, sequential and diverging palettes. However, there are still many different color palettes from the same category available (e.g. “magma”, “inferno”, “plasma”, “virdis” from bokeh.) and I usually just randomly chose one. Thus, I’d like to know if there are some rules or guidelines when chosing the color palette.

This is a good question. Most colormaps recommended online are generic colourmaps that do not encode any semantic meanings of the data values. It is useful to create domain specific colormaps that help standardize the semantic association between colours and data ranges / categories / critical data values. This can be done in several ways:

  1. Use a generic categorical colormap recommended for an established source, such as ColorBrewer, and assign the individual colours to categories in a more meaningful way.

  2. Assigning metaphoric colours to different categories, and use an algorithm to optimise the initial categorical colormap. See:

H. Fang, et al. “Categorical colormap optimization with visualization case studies.” IEEE TVCG, 23(1):871-880, 2017.

It is pity that their software is no longer available, but one can use the CCC tool instead. See the link in

P. Nardini et al. “The Making of Continuous Colormaps.” IEEE TVCG, doi: 10.1109/TVCG.2019.2961674

Note that this can also be used for continuous colour maps.

  1. Using the method in

S. Lin, et al. “Selecting semantically-resonant colors for data visualization.” Computer Graphics
Forum, 2013.

to identify metaphoric colours and use the methods mentioned in (2) to optimise the colormap.

  1. In some cases, it is not easy to identify metaphoric colors. One may use alliterative associations (a form of logology) [Fang et al. 2017] to help make the colour symbolism more memorable. The common approach is to take the first letter of the category names (e.g., M, I, P, V for “magma”, “inferno”, “plasma”, “virdis”), and assign colours (or fruits/vegetables/objects colours) with names (or objects’ names) starting with the same letters. The “list of colors” at Wikipedia can be useful.