__m Ii _/ Visualization Viewpoints Editor: Theresa-Marie Rhyne Rainbow Color Map (Still) Considered Harmful David Borland and Russell M. Taylor II University of North Carolina at Chapel Hill Research has shown that the rainbow color map is rarely the optimal choice when displaying data with a pseudocolor map. The rainbow color map confuses viewers through its lack of perceptual ordering, obscures data through its uncontrolled luminance variation, and actively misleads interpretation through the introduction of non-data-dependent gradients. Despite much published research on its deficiencies, the rainbow color map is prevalent in the visualization community. We present survey results showing that the rainbow color map continues to appear in more than half of the relevant papers in IEEE Visualization Conference proceedings; for example, it appeared on 61 pages in 2005. Its use is encouraged by its selection as the default color map used in most visualization toolkits that we inspected. The visualization community must do better. In this article, we reiterate the characteristics that make the rainbow color map a poor choice, provide examples that clearly illustrate these deficiencies even on simple data sets, and recommend better color maps for several categories of display. The goal is to make the rainbow color map as rare in visualization as the goto statement is in programming—which complicates the task of analyzing and verifying program correctness (see the classic "Go To Statement Considered Harmful" paper by Dijkstra at http ://www.acm.org/classics/oct95/). Problems with the rainbow color map Pseudocoloring is a visualization technique for displaying scalar field data. Data values are mapped through a pseudocolor scale—or color map—to determine the color representing each value. The mapping can be arbitrary, but most color maps work by continuously varying some color property, such as hue or saturation, to represent higher and lower data values. The rainbow color map varies hue to approximate the electromagnetic spectrum's visible wavelengths and is probably the most common color map used in the visualization community. The reason for this popularity might be due to inertia: users, especially physicists, adopted it early on, and others in many disciplines have since followed. It might be due to the notion of "the more colors, the better." Or it might simply be that it's the default option in many visualization toolkits and applications. It's used to display data in journals, conference proceedings, mouse pads, calendars, US Navy com- mercials, weather forecasts, and even the IEEE Visualization Conference 2006 call for papers, just to name a few. The problem with this wide use of the rainbow color map is that research shows that it is rarely, if ever, the optimal color map for a given visualization.1"6 Here we will discuss the rainbow color map's characteristics of confusing the viewer, obscuring data, and actively misleading interpretation. Confusing For all tasks that involve comparing relative values, the color map used should exhibit perceptual ordering. A simple example of a perceptually ordered color map is the gray-scale color map. Increasing luminance from black to white is a strong perceptual cue that indicates values mapped to darker shades of gray are lower in value than values mapped to lighter shades of gray. This mapping is natural and intuitive. The rainbow color map is certainly ordered—from a shorter to longer wavelength of light (or vice versa)— but it's not perceptually ordered. If people are given a series of gray paint chips and asked to put them in order, they will consistently place them in either a dark-to-light or light-to-dark order. However, if people are given paint chips colored red, green, yellow, and blue and asked to put them in order, the results vary (see Figure 1) 7 Some even put them in alphabetical order. To put them in the so-called correct order, most people must remember Roy G. Biv (red, orange, yellow, green, blue, indigo, violet), or some other mnemonic representation of the order of colors in the rainbow. When we use a color map that is not perceptually ordered to present ordered data, confusion results because greater-than and less-than relationships are not immediately evident, and we must infer them through remembering (an error-prone task) or consulting a legend (a needless distraction for determining order, but good practice for conveying the data's scale). Obscuring The visual system perceives high spatial frequencies through changes in luminance.2,4 Thus, to see small detail and sharp features in a given data set, we should use a luminance varying color map, such as the grayscale color map. The rainbow color map is isoluminant for large portions, with apparent changes only at color boundaries. Therefore, the approach obscures small 14 March/April 2007 Published by the IEEE Computer Society 0272-1716/07/S25.00© 2007 IEEE details in the data falling within single color ranges in the color map (see Figure 2). Actively misleading Not only does the rainbow color map confuse viewers through its lack of perceptual ordering and obscure data through its inability to present small details, but it actively misleads the viewer by introducing artifacts to the visualization. The rainbow color map appears as if it's separated into bands of almost constant hue, with sharp transitions between hues. Viewers perceive these sharp transitions as sharp transitions in the data, even when this is not the case (see Figure 3). When combined with the lack of perceptual ordering, viewers face a daunting task when trying to correctly interpret the data via the rainbow color map. The goal of visualization is to present data so that viewers can quickly and accurately learn about the underlying data. The rainbow color map does a great deal to hinder this learning process by introducing confusing artifacts in some locations and reducing detail in others. Prevalence of the rainbow color map Although researchers have well documented these deficiencies, the visualization community still widely uses the rainbow color map. We present the findings of two surveys illustrating this prevalence. The first survey looks at papers in the IEEE Visualization Conference proceedings; the second considers visualization toolkits. IEEE Visualization proceedings We searched the IEEE Visualization conference proceedings from 2001 through 2005 for papers that displayed data using a pseudocolor map. We included visualizations in which the rainbow color map was applied to surfaces, such as isosurfaces and streamlines. We excluded volume renderings as the literature does not address the relative merits of the rainbow color map when used for a color transfer function (although it seems clear that the same objections would apply). We did not count visualizations that used a banded version of the rainbow color map because explicit banding can be a useful visualization technique. We only included scalar data visualizations, excluding techniques such as mapping vector components to RGB—which is common with diffusion tensor MRI images. Such visualizations can appear at first glance to use the rainbow color map, but they are in fact using a different technique (see Rheingans8 for a discussion of the hazards of encoding multiple values into a pseudocolor map). Results Table 1 (next page) presents statistics from the 2001 through 2005 IEEE Visualization Conference proceedings. The table gives percentages of papers implementing pseudocoloring to display data using the rainbow color map. We've included all papers that include at least one use of the rainbow color map. The results are alarming: ■ Each year between 40 and 59 percent of all papers using pseudocoloring used a rainbow color map. v4 (a) X (b) 1 Perceptual ordering, (a) We can easily place the gray paint chips in order based on perception, (b) but cannot do this with the colored chips. 2 Spatial contrast sensitivity function. Frequency increases to the right and contrast increases toward the bottom of both images in the figure. We can see detail at much lower contrast in the (a) luminance-varying gray-scale image than with the (b) rainbow color map. 3 Four data sets visualized with (a) rainbow, (b) gray-scale, (c) black-body radiation, and (d) isoluminant green-red color maps. Apparent sharp gradients in the data in (a) are revealed as rainbow color map artifacts, not data features, by comparing this row with the same data viewed using the other color maps. Conversely, the sharp gradient found at the center of the second data set (see the second column) shown in the gray-scale and black-body radiation (and to a lesser extent, the isoluminate green-red) images is not found in the corresponding image with the rainbow color map. IEEE Computer Graphics and Applications 15 Visualization Viewpoints Table 1. Statistics from the 2001 through 2005 IEEE Visualization Conference proceedings papers implementing pseudocoloring to display data and that use the rainbow color map. Year Relevant Papers Including Medical Images (%) Relevant Papers Excluding Medical Images (%) Number of Pages 2001 47 62 8 2002 40 45 18 2003 52 71 32 2004 59 68 62 2005 52 59 61 Total 51 61 181 ■ The three most recent years all had a higher percentage than the previous two years; hence, the rainbow color map has become more prevalent. ■ The situation becomes worse when ignoring medical imaging modalities (such as MRI, computerized tomography, x-ray, and ultrasound, in which the standard is the gray-scale color map). In 2003 the figure, with medical images excluded, was more than 70 percent. ■ The total percentages over all years are 51 percent including medical images and 61 percent without. Visualization toolkit defaults As demonstrated previously, the rainbow color map is the most widely used color map in the visualization community. The fact that it is selected as the default color map in many visualization toolkits encourages its popularity (both within the visualization community and to casual users). Eight out of the nine toolkits and programs that we investigated used the rainbow color map as the default. Inspection or documentation indicated that ParaView, Matlab, VisAD, Ensight, Iris Explorer, and AVS Express all use the rainbow color map by default. Supplied tutorials indicated that SCIRun and OpenDX use the rainbow color map by default. Amira is the only program reviewed that does not use the rainbow color map by default. What color map should be used? Our discussion of the problems with the rainbow color map immediately begs the question, What is the best choice? This is a difficult question because the best choice depends on the viewer's task, on whether another visualization technique such as a height field is used in conjunction with color, and on the frequency content and noise within the data displayed. Although the rainbow color map is universally inferior to other color maps, there is no color map that is better than all other maps in all circumstances. This section presents appropriate maps for a variety of circumstances, drawing heavily on material presented in chapters three and four of Ware.7 Here, we adopt the taxonomy of measurement scales defining four scalar data types: nominal, ordinal, interval, and ratio. The following presentation ignores color blindness, which affects 10 percent of the male population, and treats only univariate color maps. (Rheingans8 discusses the difficulties found when trying to use color for bivariate display.) Nominal data For labeling nominal regions of data whose categories have no implied ordering (such as material types or political affiliations) a selection of distinct colors is optimal. Healey treats the question of which colors are optimal to label n different categories based on color separability, distance in CIE LUV space, and color categories.9 Ware recommends the six opponent-channel colors (red, green, yellow, blue, black, white) followed by six other distinct colors (pink, cyan, gray, orange, brown, and purple) for this purpose.7 Luminance and saturation variations enable use of more colors than the eight distinguishable colors found in the rainbow color map. High-frequency ordinal data Ordinal data has a specified order but no metric for distance—for example, describing small, medium, and large pizza pies does not specify actual size. (The following discussion also applies to data sets that do intrinsically have a metric but for which only the shape of local changes rather than actual value is of interest to the viewer, as is often the case with medical images.) Research shows that viewers can see details more readily when luminance contrast is present than when it is not.2,4 Luminance is based on inputs from only the red and green channels—making it impossible to generate a uniform-luminance rainbow scale including deep blue. The most obvious perceptually ordered color map with luminance contrast is the gray-scale color map. Unfortunately, the early visual system converts from absolute brightness to brightness relative to surround, which distorts readings enough to produce errors of up to 20 percent of the entire scale.7 A spiral through color space can help overcome these contrast effects. A perceptually ordered choice is the heated body scale, also known as the black-body radiation spectrum because it reproduces the colors coming from a heated black body (such as a canon ball) through red and yellow to white hot.6 Figure 3c uses a variant of the black-body radiation spectrum that reproduces well across various displays. Color map on a surface The desire for luminance contrast directly conflicts with the presentation of a color map on top of an underlying geometric shape. This is because the human visual system uses luminance variation for the determination of object segmentation, shape, motion, and stereo depth.7 For cases where accurate presentation of the 16 March/April 2007 underlying surface shape is important, an isoluminant color map should be employed. Perceptually uniform isoluminant color maps include saturation scales that go from gray to red or green, and also double-ended scales such as passing from green through gray to red. Interval and ratio data Interval data sets have measurable distances (degrees Celsius, height) and ratio data sets also have a zero point (degrees Kelvin, height above sea level). Although attempts to display interval and ratio data often use color maps, user studies have shown that contrast effects and other perceptual distortions make the user incapable of coming up with accurate absolute value judgments.7 However, the double-ended scales mentioned previously can indicate on which side of zero a region lies. Abandonment of the presentation of continuously varying data enables the use of intentional regularly spaced banding in the color map. An excellent example of this technique applied to cartography appears on page 76 of Tufte.5 The technique requires the viewer to estimate values between the bands based on their spacing. This takes control of the banding effect found in the rainbow scale and uses it to good effect, without the attached disadvantages of nonperceptual ordering and uncontrolled variations. By selecting a number of perceptually ordered colors, we can construct a scale with equally sized bands of constant color. This technique is similar to the display of isovalue contours on the surface, but in this case, the region between successive contours is filled in with a constant color. The two techniques are particularly effective when used together: contours of a different luminance than the colors both provide detail and reduce contrast effects at the edges of the bands. What default for a toolkit? The selection of the best color map depends so critically on the data set and addressed questions that there is not a single best choice, but rather a collection of sets with different characteristics. The best solution would present the user with a choice whenever a color map is created, listing best types for each circumstance. Cindy Brewer's ColorBrewer tool enables selection of handcrafted color schemes for various tasks (see http ://www.colorbrewer.org). In the absence of feedback about the data or task, the best approach for situations where color is the only display technique is probably the black-body radiation spectrum, because of its perceptual ordering and use of color to avoid contrast effects. For situations where a user displays the color map on top of geometry that uses directional illumination to indicate shape, the best choice is a perceptually ordered isoluminant map such as a green-to-red opponent-color scale. Conclusion The purpose of visualization is to effectively convey information to human viewers. The rainbow color map hinders this task by confusing, obscuring, and actively misleading. Despite this knowledge, the visualization community predominantly chooses the rainbow color map over other approaches. We as a visualization community must do better, making the rainbow color map as rare in visualization as the goto statement is in programming. ■ References 1. A. Light and P.J. Bartlein, "The End of the Rainbow? Color Schemes for Improved Data Graphics," EOS Trans. Amer. Geophysical Union, vol. 85, no. 40, 2004, p. 385. 2. B.E. Rogowitz and L.A. Treinish, "How Not to Lie with Visualization," Computers in Physics, vol. 10, no. 3, 1996, pp. 268-273. 3. B.E. Rogowitz and L.A. Treinish, "Data Visualization: The End of the Rainbow," IEEE Spectrum, vol. 35, no. 12,1998, pp. 52-59. 4. C. Ware, "Color Sequences for Univariate Maps: Theory, Experiments, and Principles," IEEE Computer Graphics and Applications, vol. 8, no.5,1988, pp. 41-49. 5. E.R. Tufte, Visual Explanations, Graphics Press, 1997. 6. S.M. Pizer and J.B. Zimmerman, "Color Display in Ultrasonography," Ultrasound in Medicine and Biology, vol. 9, no. 4,1983, pp. 331-345. 7. C. Ware, Information Visualization: Perception for Design, 2nd ed., Morgan Kaufmann, 2004. 8. P. Rheingans, "Color, Change, and Control for Quantitative Data Display," Proc. IEEE Visualization, IEEE CS Press, 1992, pp. 252-259. 9. C.G. Healey, "Choosing Effective Colors for Data Visualization, Proc. IEEE Visualization, IEEE CS Press, 1996, pp. 263-270. Contact author David Borland at borland@cs. unc. edu. Contact editor Theresa-Marie Rhyne at tmrhyne@ ncsu.edu. FREE Visionary Web Videos about the Future of Multimedia. Listen to premiere multimedia experts! Post your own views and demos! Visit www.computer.org/multimedia IEEE Computer Graphics and Applications