0
votes

I have a variety of image plots where I use different colormaps for each one. I would like to plot colored lines on these graphs that are noticeable against the background/have a large contrast to the colors used in the colormap.

Is there a list of/method to calculate the best visual contrast colors for the color maps?

If an answer only exists for particular color maps: I mainly use colormap(jet) and the 2015 default colormap, which I believe is colormap(parula)

1

1 Answers

0
votes

Unfortunately the answer is kind of subjective; at one extreme, black and white offer, obviously, the best contrast. At the other, red and green may look the same to a color-blind person. Relative brightness between foreground and background is also important for contrast. I think you have two approaches: the simplest might be that opposite ends of the colormap tend to have good contrast. A more elaborate approach is to generate a list of [foreground, background] combinations that in your judgement provide good contrast. You can look at a color-wheel to have a good idea, but trial and error or looking at guidelines for illustrators may give you hints.