Scott Harden can’t see rainbows. “When I look at a rainbow, I see two or maybe three colours, and they’re not evenly spaced out,” he says. So when scientific figures use a rainbow colour map, he finds them largely uninterpretable.
A neuroscientist at the University of Florida in Gainesville, Harden has protanomaly: he cannot differentiate red from green pigments because of a genetic mutation that affects how the cones of his retina detect red light.
Red–green colour blindness is the most common form of colour vision deficiency; blue–yellow colour blindness is less common, and achromatopsia, the inability to see most colours, is rarer still. In northern Europe, 1 in 12 men and 1 in 200 women have a colour vision deficiency — enough people that making your work accessible is simply the right thing to do, says Harden. “I consider using colour-blind-friendly palettes and colour maps as a way to express empathy to people who are truly interested in your work.”
But to put those numbers in more pragmatic terms, if all three of a paper’s reviewers are male and of northern European descent, there’s a one in five chance that one of them will have a colour deficiency.
Poor colour choices can also distort data. A study published in 2011 found that physicians were significantly worse at diagnosing heart disease from arterial scans that used a rainbow scale than from scans designed for improved perception1. And people are generally less able to resolve gradations in red than in other colours, so colour combinations that rely heavily on red can obscure details in the data. And some colour schemes do not translate well to greyscale — an important consideration when scientists print papers in black and white for offline reading.
Most data visualization packages include colour maps that are accessible to people with colour vision deficiencies, and tools are available online for selecting appropriate hues (see ‘Tips and tools’). Yet researchers rarely seek out these resources, because they aren’t trained to think about colour selection, says Helena Jambor, a data-visualization scientist at the Dresden University of Technology in Germany.
In a study published in March, Jambor and her colleagues found that almost half of cell-biology papers and up to one-quarter of physiology and plant-science papers in leading journals contained images that would be completely or partially inaccessible to readers with deuteranopia, another form of red–green colour blindness2. “The tools are there for anybody that really wants them,” says Claus Wilke, a computational and evolutionary biologist at the University of Texas at Austin and author of Fundamentals of Data Visualization (2019). “The biggest challenge is actually to teach people to pay attention.”
Whether you’re mapping ocean temperature, graphing vaccination levels or imaging proteins in a cell, don’t simply accept the default colour settings in the software, says Ryan Renslow, a chemical engineer at the Pacific Northwest National Laboratory in Richland, Washington. “Most commercially available software doesn’t have the best default colour maps,” he says.
All colour maps assign a hue to each value in the data set to visually represent how those values change, and tools such as Matplotlib, a library for creating visualizations in the programming language Python, and ggplot, the equivalent in R, offer several to choose from. But for the most accessible and understandable images, avoid those that use rainbows, such as Jet, says Fabio Crameri, a geophysicist at the University of Oslo, who co-authored a 2020 article offering guidance on the use of colour in scientific images3.
The big picture
As well as creating accessibility issues, rainbow colour maps can distort the data, Crameri says. The sharp transitions between the colours can create artificial distinctions in the data. And the ‘distance’ between colours is not uniform, so data points marked in different colours might look closer — or further away — from each other than they actually are. Also, he says, rainbow colour maps generally don’t reflect anything intuitive about the numerical values they represent (see ‘Creating inclusive graphics’).
Instead, researchers should use perceptually uniform maps, such as viridis and cividis, Harden advises. Both are included in many data visualization environments, and viridis has now replaced Jet as the default map in Matplotlib. Because red is so problematic for many people, viridis’s developers used shades of blue and yellow to create a map that covers a range of hues without compromising perceptual uniformity. Renslow and his colleagues then mathematically optimized that palette to create cividis, which is interpreted identically by people with and without colour vision deficiencies4. (If researchers must use a rainbow colour map, Harden advises trying Turbo, which is more perceptually uniform than Jet and uses hues that are interpretable to most people with colour vision deficiencies.)
For data that increase or decrease around zero, researchers can use two colours with increasing intensity in either direction — as long as those colours aren’t red and green, Harden says.
Whatever colour scheme you use, run your figures through an online simulator such as Color Oracle or Coblis to see how they look to people with colour vision deficiencies, Wilke says. Another good check is to print the image in greyscale or completely desaturate it (that is, mute all the colours). If you can still decipher it, you’re probably good to go, he says.
If you’re working with a chart, Jambor suggests an even more deliberate approach: create the image in greyscale, then add colour at the end, after you’ve thought through what you want the data to show. “Then it’s harder to get it wrong,” she says, adding that one of the biggest issues she sees is figures that use too many colours, or that use them inconsistently across a paper.
Pick a palette
Plotting categorical data — such as demographic features — requires not a continuous colour map but a colour palette, which is basically a list of discrete colours that work well together. For this, says Wilke, avoid going from light to dark so as not to create the impression that your categories have a natural order. He also advises against having, say, four light colours and one dark one, because the dark one will stick out. “You need colours that are comparable to each other but also sufficiently different that someone with colour vision deficiency can still disentangle them.”
When possible, use a professionally designed colour scale, advises Wilke. But restrict the use of reds. “Many people struggle to differentiate red and green, but if you choose a palette containing deep red and light green you will be OK,” Wilke says. And if you must use red, don’t pair it with black, pleads Harden. “This is the most common offence I see in papers out there,” he says.
The same rules apply to microscope images. Although red- and green-fluorescent proteins are commonly used, most microscope cameras capture images in greyscale, so researchers can simply colour those in their hue of choice. If you’re working with just one colour, stick to greyscale, Harden advises. For two, try green and magenta. Harden has developed a workaround for when he encounters images that use red and green: open the figure in ImageJ, the US National Institutes of Health’s free image-processing program, split the image into separate colour channels (that is, red, green and blue), and then recombine them as needed to create a green and magenta image. “People who have red impairment can typically see magenta really well,” he says.
There is more to accessible figures than colour, however. The size and thickness of your dots, lines and other image elements are important, too, says Wilke. “How we perceive colour depends strongly on the amount of surface area that’s coloured in.” Adding labels directly to the figure, rather than to a separate legend, can lessen the mental load for readers who are already struggling to differentiate the colours. And don’t neglect the size of the labels, he adds. “This is my pet peeve — most people label too small.”
Last year, Alba Fernández-Barral, outreach and education coordinator at the Cherenkov Telescope Array in Bologna, Italy, and her colleagues published an initial set of accessibility criteria that members of the array must use in both scientific studies and public outreach documents (see go.nature.com/3d3v4bf). One big problem that consortium members with colour blindness noted was how researchers described their images — both in oral presentations and in captions, says Fernández-Barral. Redundant information is key, she says. Make the dots different shapes, or the lines different textures, to provide cues besides colour for disambiguating them. Reflecting these descriptions in the caption will provide extra cues for readers who are colour blind.
Overall, she says, getting people to reflexively consider accessibility in creating scientific figures is a retraining process. “I think most people have been educated in empathy and respect, but sometimes I wonder if we’ve been educated in inclusion,” she says. “That has to become an integral part of science.”