Clearly distinguishable colours for scientific figures
I am looking for pointers on how to pick a set of colours (or a colour gradient) that are clearly distinguishable, for use in scientific figures. Was there any systematic research on this? If yes, I'd appreciate some links.
When creating scientific figures, colour is often used to distinguish elements. One example is lines in a plot:
Another example is a colour gradient to denote values:
I'm interested in two questions:
How can I pick the largest set of colours that are still distinguishable from each other, for use in a plot? Similarly, what colour gradient will allow the eye to discern the largest set of values and detect the slightest change? Are there colour schemes made specifically for this? I'm looking for something that works well both on-screen and in print.
How can I pick a set of colours (or a gradient) that are still distinguishable enough when converted to greyscale, but the contrast is enhanced when they're viewed in colour? Is there a colour gradient that is not much worse in this respect that a full-white to full-black gradient when converted to greyscale, but gives significantly enhanced contrast when reproduced in full colour? (Take e.g. my example figure from above with the rainbow colour: it has excellent contrast in colour, but it's unusable in greyscale. Many scientific journals will publish figures in colour online, but ask for figures that are usable in greyscale too, in the print edition.)
For your first question you might want to look into a color wheel, here's an example. Just divide the 360 degrees of the wheel into as many parts as you have required elements and you'll get colors that contrast from each other as much as possible.
For example, if you have 3 elements, your colors would be red, blue and lime.
As per figures usable in black and white, you'll often find that patterns might help identify different graphs, where such application is possible. Where using patterns isn't possible your best bet is selective desaturation where different hues result in different shades, see an image example over here.
Selective desaturation applied to your original image can be seen here: