|
Home Up
| |
What a color ramp is
A color "ramp" is a continuous succession of colors extending
between two specific colors. For example, here are three ramps between red
and blue.
| Lab |
RGB |
HSV |
Evidently there are many ways to ramp between colors. The standard
way is to assign numeric coordinate values to colors. Sets of
valid coordinates describe a corresponding "color
space." Specific colors correspond to points in the color
space. A ramp can be created by drawing any continuous curve
between these points within the color space. Usually, the simplest
possible curve is chosen: a straight line segment.
These ramps are based on three common color spaces. In the RGB
space, for example, red has coordinates (1,0,0) and blue has coordinates
(0,0,1). In the HSV space, however, red has coordinates (0,1,1)
and blue has coordinates (0.667,1,1). This implies two things:
 | The color ramps will consist of different sets of coordinates in
the color spaces. |
 | Because the color spaces are different, the colors associated with
the same coordinates are likely to differ. |
This causes the intermediate colors to differ. |
 |
 |
 |
What this means in practice
The RGB coordinates describe the relative intensities of the red, green, and
blue dots on your video screen (or their equivalent on any other output
device). They are useful for precisely specifying what color should appear
on the screen. However, the ramps created in this color space are often
dull and uninteresting. Because neither the red node nor the blue node
have any green at all, no color in the ramp has any green either. All you
get are reds and purples. As a means of encoding a range of values this
sometimes does not work very well.
The HSV coordinates approximately describe the actual color in the rainbow
("hue"), how bold or "saturated" the color is, and how
bright it is--its "value". HSV ramps can therefore provide fine
gradations of lightness and saturation, which may provide better scales for
encoding quantitative information. The rainbow ramp above has been
criticized as not having a natural correspondence with any continuous numeric
scale. For example, can you tell whether cyan "higher" or
"lower" on the scale then yellow without looking at the legend?
However, because colors of the rainbow are so distinctive, such a ramp can be
very useful in displaying data in a way that makes "nearby" values
look close and "distant" values look distinct. Maps of angles or
any other periodic property are often enhanced by using such scales.
The Lab coordinates are an attempt to model the varying sensitivity of the
human eye to colors of different wavelengths. We do not perceive a solid
red dot of a given absolute intensity as well as we perceive a solid blue dot of
the same intensity. By using Lab coordinates, which otherwise create ramps
similar to the RGB ramps, there is a hope of achieving more uniform (and
therefore more accurate) gradients of lightness within a ramp.
Overcoming the limitations of single ramps
 |
Often, when visualizing
information, we want different groups of data to be visually quite
distinct, yet we would like to display the relative order of data within
a group. The classic example is land heights and sea depths shown
on the same map: it is natural to use color to distinguish height from
depth while graduating the intensity or saturation of the color to
show relative height and relative depth.
The ramp to the left (in Lab space) shows such a graduation.
Intense, dark colors correspond to extreme heights or depths.
Orange shows heights above sea level, cyan shows depths below sea level.
This is a complex ramp. It is formed by two separate color
ramps having a common endpoint, or node. We might say,
tersely, that this complex ramp goes from dark orange to white to dark
cyan in Lab space.
Another way to think of this complex ramp is in terms of where its
nodes are located in their color space. There are three distinct
nodes. The two parts of the ramp--orange to white, white to
cyan--correspond to two straight line segments in that space. They
form a continuous path from dark orange to dark cyan.
This description of the complex ramp illustrates its potential
applications. You can approximate any curved path between two
points using a series of straight segments. Likewise, you can
construct a color ramp to meet any visualization need by assembling a
suitable complex ramp. Simply specify some of the intermediate
colors and where they should occur, then "ramp in" the
remaining values. |
 |
Here is a complex ramp designed to
progress from light cyan to dark red through progressively darker greens,
blues, and purples. It is formed by four ramps through five
nodes. The black bars to the right of the ramp show the node
locations. All interpolation has been performed in RGB space.
Usually, simpler is better. Color is no exception. In
practice, monochromatic ramps (that is, ramps between some color and a
shade of gray or white) and bichromatic ramps like the orange-cyan
ramp above are very effective for maps and statistical graphics. The
more complex the ramp, the more difficult it will be to understand how
color represents data. |
More information
There is a large body of literature on the perception, creation, processing,
science, and use of color. An excellent place to look for details about
RGB, HSV, Lab, and other spaces is the color
FAQ page. For evaluation and criticism of the use of color to display
quantitative information, see Chapter 5 of Envisioning Information
(Edward Tufte, Graphics Press, Cheshire, CT, 1990).

|