Previous Next


                                       482
CHAPTER 6                                                                Rendering



low components. The second step is to generate a black component and alter the
other components to produce a better approximation of the original color.

The subtractive color primaries cyan, magenta, and yellow are the complements
of the additive primaries red, green, and blue. For example, a cyan ink subtracts
the red component of white light. In theory, the conversion is very simple:
   cyan = 1.0 – red
magenta = 1.0 – green
 yellow = 1.0 – blue

For example, a color that is 0.2 red, 0.7 green, and 0.4 blue can also be expressed
as 1.0 − 0.2 = 0.8 cyan, 1.0 − 0.7 = 0.3 magenta, and 1.0 − 0.4 = 0.6 yellow.

Logically, only cyan, magenta, and yellow are needed to generate a printing color.
An equal level of cyan, magenta, and yellow should create the equivalent level of
black. In practice, however, colored printing inks do not mix perfectly; such com-
binations often form dark brown shades instead of true black. To obtain a truer
color rendition on a printer, true black ink is often substituted for the mixed-
black portion of a color. Most color printers support a black component (the K
component of CMYK). Computing the quantity of this component requires some
additional steps:

1. Black generation calculates the amount of black to be used when trying to re-
   produce a particular color.
2. Undercolor removal reduces the amounts of the cyan, magenta, and yellow
   components to compensate for the amount of black that was added by black
   generation.

The complete conversion from RGB to CMYK is as follows, where BG (k) and
UCR (k) are invocations of the black-generation and undercolor-removal func-
tions, respectively:
 c= 1.0 – red
m = 1.0 – green
y = 1.0 – blue
k = min (c, m, y)
   cyan = min (1.0 , max ( 0.0 , c – UCR (k) ) )
magenta = min (1.0 , max ( 0.0 , m – UCR (k) ) )
 yellow = min (1.0 , max ( 0.0 , y – UCR (k) ) )
  black = min (1.0 , max ( 0.0 , BG (k) ) )

Previous Next