In my last post I introduced a CIE Lab linear L* rainbow palette from a paper by Kindlmann et al. . I used this palette with a map of South America created with data from the Global Land One-km Base Elevation Project at the National Geophysical Data Center. The map is the third one in the figure below.
Based on visual inspection I argued that linear L* colored map compares more favourably with the grayscale – my perceptual benchmark – on the right – than the first and second, which use my ROYGBIV rainbow palette (from this post) and a classic rainbow palette, respectively. I noted that looking at the intensity of the colorbars may help in the assessment: the third and fourth colorbars are very similar and both look perceptually linear, whereas the first and second do not.
So it seems that among the three color palettes the third ones is the best, but…..
… prove it!
All the above is fine and reasonable, and yet it is still very much subjective. How can I prove it, convince myself this is indeed the case?
Well, of course one way is to use my L* profile and Great Pyramid tests with Matlab code from the first post of this series. Look at the two figures below: comparison of the lightness L* plots clearly shows the linear L* palette is far more perceptual than the ROYGBIV.
One disadvantage of this method is that you have to use Matlab, which is neither free nor cheap, and have to be comfortable with some code and ASCII file manipulation.
Just recently I had an idea for an open source alternative with ImageJ and the 3D color inspector plugin. The only preparatory step required is to save a palette colorbar as a raster image. Then open the image in ImageJ, run the plugin and display the colorbar in Lab space in a 3D view. There are many options to change the scale of the plot, the perspective, and how the colors are displayed (e.g. frequency weighted, median cut, etcetera). The view can be rotated manually, and also automatically. Below I am showing the rotating animations for the same two palettes.
The whole process, including the recording of the animations using the Quicktime screencast feature, took me less than 10 minutes, and it leaves no doubt as to which one is the best color palette. Let me know what you think.
A few observations: in 3D the ROYGBIV palette is even more strikingly and obviously non-monotonic. The lightness gradient varies in magnitude, resulting in non-uniform contrast. Compare for example the portion between blue and green to that between green and yellow: these have approximately the same number of samples but very different change in lightness value between the extremes. The gradient sign also changes, producing perceptual inversions, for example with the yellow to red section following the blue to yellow. These inversions may result in perceived elevation inversions, for example, if using this palette to display elevation data. On the other hand, the linear L* palette nicely spirals upwards with L* changing monotonically from 0 to 100.
 Kindlmann, G. Reinhard, E. and Creem, S., 2002, Face-based Luminance Matching for Perceptual Colormap Generation, IEEE – Proceedings of the conference on Visualization ’02
Related posts (MyCarta)
The rainbow is dead…long live the rainbow! – the full series
What is a colour space? reblogged from Colour Chat
Color Use Guidelines for Mapping and Visualization
Is Indigo really a colour of the rainbow?
Why is the hue circle circular at all?
A good divergent color palette for Matlab
Related topics (external)
Color in scientific visualization
The dangers of default disdain
How to avoid equidistant HSV colors
Color Oracle – color vision deficiency simulation – stand alone (Window, Mac and Linux)
Dichromacy – color vision deficiency simulation – open source plugin for ImageJ
Vischeck – color vision deficiency simulation – plugin for ImageJ and Photoshop (Windows and Linux)
NASA’s teaching resources for grades 6-9: What’s the Frequency, Roy G. Biv?
ImageJ and 3D Color inspector plugin
Pingback: The rainbow is dead…long live the rainbow! – series outline | MyCarta
Pingback: The rainbow is dead…long live the rainbow! – Part 5 – CIE Lab linear L* rainbow | MyCarta
Pingback: Perceptual rainbow palette – the method | MyCarta
Pingback: Perceptual rainbow palette – the goodies | MyCarta
Pingback: Visualizing colormap artifacts | MyCarta