Many people have written:

black = min (cyan, magenta, yellow) cyan = cyan - black magenta = magenta - black yellow = yellow - blackLet's clear this up now. If you read the PostScript manuals, the above equations are what you'll find. Unfortunately, they're not quite correct. What you really want to use to adjust the cyan, magenta, and yellow values for the addition of the black are:

cyan = (cyan - black) / (1 - black) magenta = (magenta - black) / (1 - black) yellow = (yellow - black) / (1 - black)assuming component values in the range [0, 1]. These equations have been (correctly) derived for many years in many graphics arts texts (e.g. Ref 1 and many TAGA publications); I don't know why Adobe couldn't get it right.

Try it for yourself.

(1) Field, G.G., Color and Its Reproduction, Graphics Arts Technical Foundation, 1988, pp. 320-9.

Here's something I wrote up last year --

The CMYK (cyan, magenta, yellow, black) color space is commonly used in
color printers, due to the subtractive properties of inks. Cyan, magenta,
and yellow are the complements of red, green, and blue, respectively, and
are subtractive primaries because their effect is to subtract some
color from white light. Color is specified by what is removed (or
subtracted) from white light. When a surface is coated with cyan ink, no
red light is reflected. Cyan subtracts red from the reflected white light
(which is the sum of red, green, and blue). Therefore, in terms of
additive primaries, cyan is blue plus green. Similarly, magenta absorbs
green so it is red plus blue, while yellow absorbs blue so it is red plus
green. A surface coated with cyan and yellow ink absorbs red and blue,
leaving only green to be reflected from white light. A cyan, yellow, and
magenta surface absorbs red, green, and blue, and there is black. To
maintain black color purity, a separate black ink is used rather than
printing cyan, magenta, and yellow to generate black. As an interesting
side note, white cannot be generated unless a white paper is used
(*i.e.*, white cannot be generated on blue paper).

Lookup tables are typically required to gamma-correct the RGB data prior to converting it to the CMY color space. Note that the gamma correction takes into account the inks and paper used and is different from the RGB gamma correction used when generating video. Some systems have additional bit planes for black data (generated by software), resulting in a 32-bit frame buffer (assuming 8 bits each for red, green, blue, and black). In this case, a lookup table for the black data is also useful.

Since ideally CMY is the complement of RGB, the following linear equations (known also as masking equations) were initially used to convert between RGB and CMY:

C = 1 - R R = 1 - C M = 1 - G G = 1 - M Y = 1 - B B = 1 - YHowever, more accurate transformations account for the dependency of the inks and paper used. Slight adjustments, such as mixing the CMY data, are usually necessary. Yellow ink typically provides a relatively pure yellow (it absorbs most of the blue light and reflects practically all the red and green light). Magenta ink typically does a good job of absorbing green light, but absorbs too much of the blue light (visually, this makes it too reddish). The extra redness in the magenta ink may be compensated for by a reduction of yellow in areas that contain magenta. Cyan ink absorbs most of the red light (as it should) but also much of the green light (which it should reflect, making cyan more bluish than it should be). The extra blue in cyan ink may be compensated for by a reduction of magenta in areas that contain cyan. All of these simple color adjustments, as well as the linear conversion from RGB to CMY, may be done using a 3 x 3 matrix multiplication:

|C| |m1 m2 m3| |1 - R| |M| = |m4 m5 m6| |1 - G| |Y| |m7 m8 m9| |1 - B|The coefficients m1, m5, and m9 are values near unity and the other coefficients are small in comparison. The RGB lookup tables may be used to perform the normalized (1 - R), (1 - G), and (1 - B) conversion, as well as gamma correction. In cases where the inks and paper are known and relatively constant (such as a color laser printer), the coefficients may be determined empirically and fixed coefficient multipliers used. Note that saturation circuitry is required on the outputs of the 3 x 3 matrix multiplier. The circuitry must saturate to the maximum digital value (

More sophisticated nonlinear RGB-to-CMY conversion techniques are used in high-end systems. These are typically based on trilinear interpolation (using lookup tables) or the Neugebauer equations (which were originally designed to perform the CMYK-to-RGB conversion).

Under color removal (UCR) removes some amount (typically 30%) of magenta under cyan and some amount (typically 50%) of yellow under magenta. This may be done to solve problems encountered due to printing an ink when one or more other layers of ink are still wet.

Ideally, cyan, magenta, and yellow are all that are required to generate any color. Equal amounts of cyan, magenta, and yellow should create the equivalent amount of black. In reality, printing inks do not mix perfectly, and dark brown shades are generated instead. Therefore, real black ink is substituted for the mixed-black color to obtain a truer color print.

Black generation is the process of calculating the amount of black to be used. There are several methods of generating black information. The applications software may generate black along with CMY data. In this instance, black need not be calculated; however, UCR and gray component replacement (GCR) may still need to be performed. One common method of generating black is to set the black component equal to the minimum value of (C, M, Y). For example, if

(C, M, Y) = (0.25, 0.5, 0.75)the black component (K) = 0.25.

In many cases, it is desirable to have a specified minimum value of (C,M,Y) before the generation of any black information. For example, K may increase (either linearly or nonlinearly) from 0 at min(C,M,Y) <= 0.5 to 1 at min(C,M,Y) = 1. Adjustability to handle extra black, less black, or no black is also desirable. This can be handled by a programmable lookup table.

Gray component replacement (GCR) is the process of reducing the amount of cyan, magenta, and yellow components to compensate for the amount of black that is added by black generation. For example, if

(C, M, Y) = (0.25, 0.5, 0.75)and

black (K) = 0.250.25 (the K value) is subtracted from each of the C, M, and Y values, resulting in:

(C, M, Y) = (0, 0.25, 0.5) black (K) = 0.25The amount removed from C, M, and Y may be exactly the same amount as the black generation, zero (so no color is removed from the cyan, magenta, and yellow components), or some fraction of the black component. Programmable lookup tables for the cyan, magenta, and yellow colors may be used to implement a nonlinear function on the color data.