Graphics Reference
In-Depth Information
RGB is not very convenient; the individual controls don't match our sense of the
“independent” characteristics of a color like “how light it is” or “how saturated it
is” or “what hue it is.” As you adjust from red toward orange by slightly increas-
ing the green component, your color also gets brighter, when all you really wanted
was to change the hue.
Two alternative interfaces are widely available for color selection: the hue-
saturation-value (HSV) interface, and the hue-lightness-saturation (HLS) inter-
face. In each, hue is varied independently of the other qualities of color (such as
how light it seems). These are useful tools, and they are somewhat more intuitive
for users of paint programs than RGB mixes, but they're the wrong tool to use
when you need to specify a colored light for rendering, or even need to specify
a color for printing, since the conversion from HSV to RGB produces only an
RGB specification; without a precise definition of RGB (sRGB might be a good
choice), such a specification is ambiguous. The web material for this chapter con-
tains a discussion of the conversion among RGB, HSV, and HLS.
28.17.1 Color Choice
No single color specification system is best for all users; even among systems
designed for usability like HSV and HLS, preferences vary. Many programs
wisely allow the user to pick colors with a dialog that can be toggled among sev-
eral different modes, allowing direct RGB specifications with sliders or typed-in
text values (typically 0 to 255), HSV selection via sliders, click-to-pick selection
from a disklike display of colors (often adjustable with a third slider to adjust from
dark to light), etc.; users quickly find which method best suits them in various cir-
cumstances.
28.17.2 Color Palettes
Our discussion of color has concentrated almost entirely on the description and
selection of single colors. But when multiple colors are displayed together, inter-
actions between them can be important. A number of peculiar optical illusions
are based on “tricking” our color-perception system. For example, it's well known
that the color surrounding a particular region can influence our perception of the
color of that region (see Figure 28.26).
When one chooses colors for a user interface, for instance, it's important to
choose them so that they are harmonious, and so that effects like the simultaneous
contrast artifacts of Figure 28.26 don't mask important design decisions. If, for
instance, we're creating a drawing program, and all interface elements relating to
drawing are in one color and all elements relating to text are in another, there will
be a problem if some elements of each kind are displayed on different backgrounds
that makes them appear to be unrelated.
Meier et al. [MSK04] have studied this problem extensively, and have devel-
oped interfaces for selecting color palettes rather than individual colors.
Figure 28.26: The simultaneous
contrast effect. The two gray
squares at the top appear to be
different colors, but are in fact
identical. The gray stripe on the
bottom is a single color across its
whole length.
28.18 Interpolating Color
We often need to interpolate between colors in graphics, in situations ranging from
simple design (“I'd like a color gradient from aqua to magenta on this background
rectangle”) to rendering (“I know the colors of this triangle at the three vertices,
 
 
 
 
Search WWH ::




Custom Search