I’m probably preaching to the visualization choir here, but hopefully this could be helpful for newcomers to the field. This post is based on information given to me by my PhD-supervisor/anti-rainbow-colormap-activist Charl Botha . I’ll start off by explaining why rainbow colormaps are almost never a good choice with some references and will provide some good alternatives and resources at the end.

There are two main problems with using a rainbow colormap in (medical) visualization. The first is that it doesn’t have a natural ordering. If you ask people how they would rank yellow and blue, they have to guess. There is of course order in there (shorter to longer wavelength of light), but it’s not perceptually ordered [1].

The second problem is that it’s not perceptually linear, so equal distances in the scale do not appear equally different color-wise. For example, people perceive the 1st and the 5th colors in your colormap to be much more different than the 5th and the 9th, when these colors would be assigned to data-values that differ by identical amounts.This is actively misleading users. Furthermore, it introduces artifacts: There are perceived sharp transitions in data at the sharp transitions between hues [1]. In the figure below this effect is clearly visible on an artificial dataset:

This figure shows the same effect on a MRI scan of the head. The rainbow colormap creates perceived contours where there are none in the data, so that structures within these bands are not represented. On top of that attention is drawn to the yellow areas, because they are the brightest, but not necessarily the most important [2]:

So by now, you may be asking yourself: ‘If you hate the rainbow colormap so much, why don’t you come up with a better one?’ The answer to this is, people have! But despite all the warnings, in the IEEE Visualization Conference proceedings of 2005, 52% of the medical papers and 59% of the non-medical papers still used the rainbow colormap [1]. In any case, here are some alternatives you could consider (from [1], with examples added):