Color mixing
"Mix yellow with blue" gives green on a painter's palette and white on a screen. Both results are correct, because these are two different kinds of mixing. A third kind, averaging mixture, is at work in every print and on every screen, though it is rarely discussed.
Additive mixing
Two lights falling on the same spot add up. Their spectral distributions sum, so the result is brighter than either component. This is how displays, projectors and stage lighting work. The primaries are red, green and blue (RGB):
Two colors that add up to white are complementary: yellow and blue, cyan and red, magenta and green.
Grassmann's laws
Hermann Grassmann described in 1853 how mixtures of light behave. In simplified form:
- Three dimensions. Every color can be matched by a mixture of three independent primaries (sometimes one of them has to be added to the test color instead, which amounts to a negative amount).
- Continuity. When one component of a mixture changes smoothly, the color of the mixture changes smoothly too.
- Additivity. Lights that look the same give the same results in mixtures, whatever their spectra. If A looks like B, then A + C looks like B + C.
- Proportionality. If A looks like B, they still match after both intensities are scaled by the same factor.
Grassmann's laws mean that mixing light is linear. That is why CIE XYZ and linear RGB can be converted with a plain matrix multiplication (see CIE XYZ and RGB). The laws hold only for linear light, not for gamma-encoded file values.
Subtractive mixing
A filter or a layer of ink passes part of the light and absorbs the rest. When light goes through two filters in a row, their transmittances multiply:
Each extra filter can only remove light, so the mixture is darker than its components. This is the basis of CMY and CMYK printing and of photographic filters.
Real paints and pigments mix in a more complex way, because light is not only transmitted through them but also scattered inside. Models such as Kubelka-Munk describe them. The simple product is a good approximation for transparent filters and thin layers of printing ink.
Averaging mixture
When different colors sit next to each other in dots too small for the eye to resolve, the eye averages them spatially. The result lies between the components, and its brightness is the average of theirs:
- display pixels: red, green and blue subpixels side by side,
- halftone printing: CMYK dots of varying size on white paper,
- pointillism in painting,
- Maxwell's spinning disk with colored sectors (averaging in time instead of space).
Averaging mixture also follows Grassmann's laws, because the eye sums light over a small area. The average must be taken in linear light, though, not on file values. That difference is why badly downscaled photos get darker (see gamma correction).
Metamerism
Because the eye sees only three numbers, a mixture can look identical to a spectral color or to a completely different mixture. Such pairs are metamers (see the introduction). All display and print technology is based on producing metamers of the colors we want to show.