Pedagogy · Course

Colorspaces.

From how the eye works to colour spaces: gamuts, dynamic range, printing, bit depth and channels. How a colour is captured, encoded and reproduced.

Vision

The light reaching the eye has no colour: it is a mix of wavelengths, which every surface unbalances by absorbing some of them. Our cones measure that imbalance, and the brain builds a colour from it. Colour is therefore not a property of the physical world but a sensation; a colour space is only a translation system, from light to numbers, then from numbers back to light, to recreate the same sensation.

Drag to rotate
pupil 0.0 mm≈ f/0.0lens f/0.0
Lightdarkfull sun

The iris, a biological aperture

The iris closes in bright light and opens in the dark: the pupil goes from about 2 to 8 mm, sixteen times more light, four stops. With a focal length of about 17 mm, the eye therefore opens from roughly f/2 to f/8; the lens beside it follows the same aperture with its blades. But the iris handles only a small part of our adaptation: most of it happens in the retina, which tunes its sensitivity over seconds to minutes. That is why the world almost always looks “well exposed” to us, while a sensor keeps the same range from one shot to the next.

3D Gamut

From colour-matching experiments carried out in the 1920s by Wright and Guild, the CIE built a mathematical space in 1931, XYZ, where every colour sensation occupies a point. Setting brightness aside gives the famous horseshoe diagram: the map of every chromaticity the human eye can perceive. RGB spaces appear on it as triangles, and as volumes once lightness is added.

Drag to rotate

CIE 1931 xy diagram

Reading the volumes

Every RGB space is a volume: all the colours it can encode, from black to white. Here each volume sits in CIELAB, a space built around perception: L* (vertical) is lightness, a* and b* (horizontal) are hue and saturation. The further a volume spreads from the central axis, the more saturated the colours the space can encode. The volume is a distorted cube: its eight corners are black, white, the three primaries and their three pairwise mixes. Colours your screen cannot show are displayed as close as it allows.

The percentages are the share of the CIE 1931 chromaticity diagram covered by the primaries' triangle, and the share of Pointer's gamut, the colours of real objects measured in 1980. ACEScg barely spills outside the visible; ACES2065-1 encloses all of it, thanks to imaginary primaries: part of its triangle stands for colours that do not exist. That is on purpose, for an archive space that must lose no colour.

Relative or absolute: RGB on its own is a relative model, “100% red” means nothing until you say which red. sRGB, P3 and Rec.2020 use the same RGB model; only the position of their primaries changes, fixed in absolute coordinates in the CIE space. Cameras and screens almost never share the same native space, and that is fine: as long as the primaries are known, conversion is unambiguous, from source RGB to XYZ, then to the destination RGB. That is what colour space transforms are for, and the reason ACES exists.

Dynamic range

Loading the studio…
clipped on screen · 0 %lost at capture

Dynamic range: blown highlights

In this room, the sky seen through the window is almost three hundred times brighter than Sophia's face, in backlight: about eight stops apart, more than nine with the darkest corners of the ceiling; the sunlit façades sit six stops above the face. A sensor cannot keep everything at once. Expose for the face and the window goes past white: it is clipped, “blown out”. Expose for the window and the face falls into black.

In 8 bits (JPEG), everything beyond white at capture is lost: lowering the exposure in grading only brings back a flat grey patch, with no detail (red zebras). In RAW or float, values beyond white are kept: the same correction brings the sky and the garden back. A real RAW also has a limit, sensor saturation, but it keeps much more headroom than a JPEG; a 3D render saved as float EXR, like this one, has almost none.

RGB and CMYK

Additive synthesis: light (screen)
Subtractive synthesis: inks (print)
Gamut corners, a*b* plane (CIELAB D50) · sRGB · Offset, coated paper (ISO 12647-2)

Screen and print: RGB and CMYK

A screen makes colour with light: three sources, red, green and blue, that add up. Black is the screen turned off; red and green together give yellow, all three give white. That is additive synthesis.

Printing starts from the white of the paper and takes light away: each ink absorbs part of the spectrum. Cyan absorbs red, magenta absorbs green, yellow absorbs blue; two overprinted inks give a screen primary (magenta and yellow: red). That is subtractive synthesis. In theory all three give black; in practice, a dark greyish brown, less dense than a true black (compare with the K disc). So a black ink is added, the K, denser and cheaper, and total ink coverage is limited: 330% at most for offset on coated paper (Fogra39).

The two gamuts do not overlap neatly. sRGB reaches much further into blues, violets, reds and magentas; offset goes beyond it in cyans, in greens leaning towards cyan and, slightly, in yellows. The diagram compares the corners of both gamuts, the pure colours and their pairwise mixes, from the target values of the ISO 12647-2 standard for offset on coated paper. Between the corners the real boundary is curved: only a printing profile, such as Fogra39, describes it in full. That is why brand guidelines give separate RGB and CMYK colours, each tuned to its medium.

Bits and channels

8 bits256 levels per channel · 16,777,216 colours

The fineness of shades

An image stores each channel with a fixed number of levels: 256 in 8 bits, 65,536 in 16 bits; in float (16-bit “half” or 32-bit), decimal numbers are stored, with no visible steps and no ceiling at 1. As long as nothing is touched, 256 levels are enough for the eye. But as soon as grading pushes the image, for instance by lifting the shadows of a dusk sky, the gaps between two levels widen and turn into bands, especially in dark tones and smooth gradients: that is banding. A 16-bit or float image keeps enough shades to be stretched without breaking.

Glossary

RAW
Generic name for a digital image file straight from a camera or scanner. Holds the raw sensor data plus the processing parameters, with no irreversible transformation - like undeveloped film, it can be reworked without damage. Larger than a JPEG. Extensions: .cr2 (Canon), .nef (Nikon), .arw (Sony), .dng.
JPEG (.jpg)
Compressed 8-bit, lossy format. The standard for the web and consumer photography. Once clipped or overwritten, the information is lost: no recovery possible.
TIFF (.tiff)
Container format, 8/16/32-bit, with no lossy compression. The standard for print and still post-production.
PNG (.png)
Lossless compressed format, 8 or 16-bit, with transparency (alpha channel). The web standard for images on a transparent background.
OpenEXR (.exr)
Format created by ILM (Industrial Light & Magic) in 2003 to store high-quality images. Channels coded in 16 or 32-bit float (or 32-bit integer), with transparency. Float can hold intensities above 1 (HDR) - the reference format for visual effects.
Cineon (.cin) / DPX
The first system, by Kodak, for the digital intermediate. Data stored in logarithmic form (10-bit log), built for scanned film. Ancestor of DPX, still used in film post.
PSD (.psd)
Photoshop's native format. Keeps layers, masks and effects. 8, 16 or 32-bit per channel.
TGA (.tga)
Truevision Targa format, keeps transparency: 16, 24 or 32 bits per pixel (at 32 bits, 8 bits per channel plus alpha). Used in video games and VFX.

Sources: cone fundamentals by Stockman & Sharpe (2000), CVRL; CIE 1931 chromaticity table; Pointer's gamut data from colour-science (BSD-3-Clause), after M. R. Pointer (1980); offset targets ISO 12647-2 (coated paper). 3D character: “Sophia Animated 003” by Renderpeople, CC BY 4.0. Photos: Xavier Reyé.

Ten questions on the eye, gamuts, dynamic range, printing and bits.