Colours play an important role in data visualisation. They are used to distinguish between categories in data, to encode and communicate numerical data and to set the look and feel of a data visualisation design.
Colour is also what many people think of when discussing accessibility in data visualisation: making sure that people suffering from colour blindness can correctly interpret a visualisation has almost become a standard procedure in data visualisation development, thanks to the proliferation of tools to pick and evaluate colour palettes.
At least as important as colour blind safe palettes for accessible data visualisation, is the contrast between the colour of text and geometrical objects in a visualisation and their background colour. The difference between the two, expressed as the contrast ratio, is part of the Web Content Accessibility Guidelines (WCAG, see the a11y? module), and should always be part of an accessibility evaluation of a data visualisation.
In order to perceive colour, the human eye uses 3 different types of photosensitive receptors (these are called “cones”). Each type of cone is sensitive to light with different wave lengths, so the cones allow us to see red, green and blue light and the full palettes that emerge from mixing these pure colours.
When one of these type of cones is not functioning properly, the ability to perceive a colour diminishes, leading to colour weakness. The most common colour weaknesses are protanomaly (red colour weakness) and green colour weakness (deuteranomaly). 1 in 12 European men suffer to some degree from red/green colour weakness, women are much less affected. Tritanomaly, blue colour weakness, is much less common.
Source: Maarten Lambrechts, CC BY 4.0
The colours of the colour palette above as seen through eyes with protanomaly
Only when the cones of a certain type are not functioning at all, we speak of colour blindness. The medical terms for the 3 types of colour blindness are similar to the ones for colour weakness, but substituting -anomaly with -anopia: protanopia (red colour blindness), deuteranopia (green colour blindness) and tritanopia (blue colour blindness).
Source: Maarten Lambrechts, CC BY 4.0
The colours of the palette above as seen through eyes with protanopia
The complete lack of the ability to perceive any colour at all is called achromatopsia, but this is very rare.
Because red and green colour weakness/blindness are the most common, combining and mixing red and green colours is not a good idea. Palettes with red, orange, brown and green colours are inaccessible to a significant part of your audience. As an example, compare how people with protanopia perceive the green and orange-brown colour in the illustrations above. They are perceived as almost identical.
Other colour combinations that are problematic for red and green colour weak/blind people are pink-turquoise-grey and purple-blue.
If you want the colours in your visualisation to be perceived the same by most people, your safest bet are blue colours. If you need multiple colours, you should go for blue with orange or red:
A palette based on reds and blue. Source: Maarten Lambrechts, CC BY SA 4.0
Perceived with deuteranopia. Source: Maarten Lambrechts, CC BY SA 4.0
Perceived with protanopia. Source: Maarten Lambrechts, CC BY SA 4.0
Perceived with tritanopia. Source: Maarten Lambrechts, CC BY SA 4.0