Early bird prices are coming to an end soon... ⏰ Grab your tickets before January 17

This article was published on November 3, 2021

Stop using ‘rainbow’ maps — it doesn’t do your data justice

Rainbow color maps are distorting data and are misleading users


Stop using ‘rainbow’ maps — it doesn’t do your data justice

The choice of color to represent information in scientific images is a fundamental part of communicating findings. However, a number of color palettes that are widely used to display critical scientific results are not only dangerously misleading, but also unreadable to a proportion of the population.

For decades, scientists have been pushing for a lasting change to remove such palettes from public consumption, but the battle over universal accessibility in science communication rages on.

A color map is a palette of multiple different colors that assign values to regions on a plot. An example of a misleading color map is rainbow, which generally starts with blue for low values, then passing through cyan, green, yellow, orange, and finally red for high values. This color combination is neither diverging, which would allow us to visually perceive a central value, nor sequential, which would make organizing values from low to high intuitive.

Color brings life to data

Using color bar graphs can allow scientists to transform their collected data into something meaningful to be shared widely. This could be the first direct impression of a black hole, the mapping of votes cast in political elections, the planning of an expensive rover route on Martian topography, the essential communication of climate change or the critical diagnosis of heart disease.

a map the surface of mars that uses rainbow colours
Martian surface topography represented with rainbow colour bar. NASA

 

Despite the clear importance of color, scientists often choose the default palette setting of the visualization software that is being used.

Distorted data

Rainbow — or jet — color palettes are often the default setting on software, but the beautiful sweep of blue to red is misleading when displaying scientific data.

Fundamentally, the change between the colors in the palette is not smooth. For example, the change between blue and green and then between yellow and red occurs over a short distance. Vik and batlow, are examples of even color palettes, where the colors change smoothly across the color bar.

To put this into context, having a palette that changes between colors wildly is like having a position x or y axis with numbers that are not evenly spaced. In jet color maps, this would be the equivalent of having numbers one to four close together and eight to 10 far apart. Such an uneven color gradient means that certain parts of the palette would be naturally highlighted over others, distorting the data. The RGB colour space based on which such uneven color gradients are created is mathematically simple, but not in tune with how we perceive colors and see the differences between them.

comparison of an apple, Marie Skłodowska Curie and the Earth in three different colour maps: original, jet, and batlow.
The impact of an uneven (jet) and an even (batlow) colour scheme on a greyscale image of Earth, Marie Skłodowska Curie and an apple. Batlow replicates the image due to its smooth colour gradient, whereas jet distorts the image. (Fabio Crameri), Author provided

Inaccessible science

Another issue with an uneven color palette like rainbow is that data presented using these colors may be unreadable or inaccurate for people with a vision deficiency or color blindness. Color maps that include both red and green colors with similar lightness cannot be read by a large fraction of the population.

The general estimate is that 0.5 per cent of women and eight percent of men worldwide are subject to a color-vision deficiency. While these numbers are lower and almost disappear in populations from sub-Saharan Africa, they are likely significantly higher in populations with a larger fraction of white people as, for example, in Scandinavia.

It is needless to state that scientific results should be able to viewed by as many people as possible, and such color-vision deficiencies should be taken into account.

Collection of colour palettes as seen by people with Colour vision deficiency
Color maps as seen with either of the three common forms of human color-vision deficiency (deuteranopia, protanopia and tritanopia), and for grey-scale (representing total colour-blindness or simple black-and-white prints). Rainbow, the most-widely used color map, doesn’t produce a smooth gradient and is not universally readable. (Fabio Crameri)

The winding road to the end of the rainbow

The issues with jet, rainbow and other uneven color palettes have been known for years. Although certain fields of science have made significant changes to best practices on color policy, other areas have stuck with their default settings.

As researchers interested in more effective data communication, we outline approaches that scientists can make to communicate their findings more efficiently: avoid using jet or rainbow default color palettes; if it is necessary to use red and green, make sure they are not the same luminosity for accessibility; and use a palette that changes evenly between the colors.

There is growing recognition of the challenges associated with rainbow palettes. Some academic publications — like Nature Geoscience — have adopted a more even color palette policy for new submissions. The Intergovernmental Panel on Climate Change has color-blind friendly guidelines for figures.

Software packages such as MATLAB and Python have removed rainbow as their default colour palette for data visualization features. However, old habits die hard and vigilance is still required — it is important to call out poor color choices when noticed (otherwise the trends keep repeating).

Better science communication, better outcomes

The importance of accurately sharing scientific data in an accessible manner cannot be understated. Uneven color gradients are often chosen to artificially highlight potential danger zones, such as the boundaries of a hurricane track or the current virus spread.

Decisions based on data being unfairly represented could produce, for instance, a Martian rover being sent over terrain that is too steep as the topography was inaccurately visualized, or a medical worker making an inaccurate diagnosis based on uneven color gradients.

Two maps of the Earth's surface displaying temperature anomaly data with annotations
Comparison of two maps showing temperature anomalies using jet and vik color maps — with jet, the data is distorted. (Fabio Crameri)

 

Accessible science for all starts with moving away from defaults. This can start with students learning to pick even color gradients for term projects, to international publishers rejecting papers for misleading figures. One day, it may even include the Meteorological Service of Canada moving away from dramatic uneven palettes to highlight weather changes.

Fundamentally, using an inaccurate color map is equivalent to a wilful misleading of the public by distorting data, and this has significant potential consequences.The Conversation

Article by Philip Heron, Assistant Professor, Environmental Geophysics, University of Toronto; Fabio Crameri, Researcher in geophysics, University of Oslo, and Grace Shephard, Research fellow, Geology and Geophysics, University of Oslo

This article is republished from The Conversation under a Creative Commons license. Read the original article.

Get the TNW newsletter

Get the most important tech news in your inbox each week.

Also tagged with