semmixcolor and perception

CMY and CMYK models

A screen emits light; paper reflects it. Printing ink does not add light, it absorbs part of it, and the rest reaches the eye. That is why print is described by a different model than a screen: by the amounts of cyan (C), magenta (M), yellow (Y) and black (K) ink.

Subtractive mixing

Each ink removes one RGB primary from white light:

cyan absorbs red → passes green and blue magenta absorbs green → passes red and blue yellow absorbs blue → passes red and green cyan + magenta = blue magenta + yellow = red yellow + cyan = green cyan + magenta + yellow = black (in theory)

CMY is therefore the inverse of RGB. In 0..1 values:

C = 1 - R M = 1 - G Y = 1 - B

Why a fourth ink

In theory three inks at full coverage make black. In practice the result is a muddy dark brown, because real pigments do not absorb their range perfectly. There are technical reasons too:

So black is added, marked K (for key, the key plate the others were registered to). The letter is not B, to avoid confusion with blue.

Formulas: RGB to CMYK

The simplest conversion replaces the common gray part of the three inks with black:

K = 1 - max(R, G, B) C = (1 - R - K) / (1 - K) M = (1 - G - K) / (1 - K) Y = (1 - B - K) / (1 - K) (for K = 1, i.e. black, C = M = Y = 0)

For RGB (200, 80, 40), #c85028:

R = 0.7843 G = 0.3137 B = 0.1569 K = 1 - 0.7843 = 0.2157 C = (1 - 0.7843 - 0.2157) / 0.7843 = 0 M = (1 - 0.3137 - 0.2157) / 0.7843 = 0.6 Y = (1 - 0.1569 - 0.2157) / 0.7843 = 0.8 CMYK = (0%, 60%, 80%, 21.6%)

The way back:

R = (1 - C) · (1 - K) G = (1 - M) · (1 - K) B = (1 - Y) · (1 - K)

Why these formulas are not enough for print

The formulas above are a geometric transformation, not a description of a real press. The result depends on the inks, the paper, the screening method and dot gain, i.e. how much halftone dots spread on the paper. The same CMYK value looks different on coated and on newsprint paper.

In practice conversion goes through the ICC profile of a specific print process (in Europe usually FOGRA39 or FOGRA51 for coated paper). The profile also sets:

CMYK, like RGB, is device-dependent. For a color to look similar on screen and on paper, the conversion has to go through a device-independent space, CIELAB. See color management.