Pro OpenGL ES for iOS

(singke) #1

CHAPTER 4: Turning On the Lights (^93)
Note Young was a particularly colorful fellow. (Someone had to say it.) Not only was he the
founder of the field of physiological optics, in his spare time he developed the wave theory of
light, including the invention of the classic double-slit experiment, which is a college physics
staple. But wait! There’s more! He also proposed the theory of capillary phenomena, was the
first to use the term energy in the modern sense, partially deciphered some of the Egyptian
portion of the Rosetta Stone, and devised an improved means of tuning musical instruments.
The laddie must have been seriously sleep-deprived.
Today, colors are most frequently described via red-green-blue (RGB) triplets and their
relative intensity. Each of the colors fades to black with zero intensity and shows varying
hues as the intensity increases, ultimately perceived as white. Because the three colors
need to be added together to produce the entire spectrum, this system is an additive
model.
Besides the RGB model, printers use a subtractive mode known as CMYK, for cyan-
magenta-yellow-black (the key). Because the three primaries cannot produce a really
deep black, black is added as an accent for deep shadows or graphic details.
Another common model is HSV for hue-saturation-value, and you will frequently find it
as an alternative to RGB in many graphics packages or color pickers. Developed in the
1970s specifically for computer graphics, HSV depicts color as a 3D cylinder (Figure 4-
1). Saturation goes from the inside out, value goes from bottom to top, and hue goes
around the edge. A variant on this is HSL, substituting value for lightness. Figure 4-2
shows the Mac OS X color picker in its many versions.
Figure 4-1. HSV color wheel or cylinder (source: Wikipedia Commons)

Free download pdf