Standard Set of Colourblind-Friendly Colours

I’m wondering if anyone has tried to implement a set of standard colours for graphs in ROOT that are colourblind-friendly. It would be nice if this was built-in and easy-to-find because most users don’t pay any attention to the colours they use.

E.g. there are eight colours here that are a good compromise between all sorts of colour blindnesses, and also look fine to non-colourblind eyes: http://jfly.iam.u-tokyo.ac.jp/color/#see

There are also 12- and 15-colour sets here: http://mkweb.bcgsc.ca/colorblind/ but I think they are less widely-compatible for all types of colourblindness.

I figure for most ROOT-type graphs eight colours should be plenty.

If I wanted to implement such a thing to submit for inclusion in ROOT, how should I build it? Just define an enum class with the specific TColor objects?

Jean-François

My 5 cents.
To the best of my knowledge, humans are able to distinguish 16 shades of grey only, so if you are going to invest time into it, try with 16 (Eight “levels” could then be built taking every second out of these 16).

Hi Jean-François,

That’s a very good idea. I guess the best way would be to have the same mechanism we already have with the greyscale mode : root.cern.ch/doc/master/classTColor.html#C04

The SetGrayScale method allows turning the color of a canvas into grayscale. We can imagine having a SetColorBlind mode on the same model … which will turn the basic color into better colors for color-blind people.

Then there is the question of Palettes: I am not sure that makes sense to turn the existing ones into a color-blind mode … but maybe it would be good to provide some which are good for color-blind people? or maybe the tag, those we already have, the ones which are good for color-blind people.

Cheers,
Olivier

We recently implemented a new function that can help in this regard:
TColor::CreateColorTableFromFile()
https://root.cern.ch/doc/master/classTColor.html#a8b075c0f885fe2e672b68d06ed966f6c

in which you can load any of the many optimized / CVD-friendly color maps available here: