Learn how color information is defined, modelled and encoded for video. Find out exactly what a color space is, and what it means for your videos.
A color space is a standard that defines the limits of color gamut, gamma and white point for a video system. These limits exist because video capture, recording, delivery and display technologies are limited in their ability to encode, decode and display color. As video technology has evolved and improved, from analog black and white video, to color, and on to digital video, these limits have expanded ever closer to the ultimate limit, which is the full color perception of human vision. With different generations of video technology, new standards have been set.
Color can be defined and modelled in different ways. The way color is defined for video encoding hasn’t changed since color information was first added to monochrome video signals. Color for video is defined by three values, these are Hue, Saturation and Lightness, or HSL.
However, the HSL color model is not a photometric color model. HSL values relate only to themselves and not to the physics of light or human color perception. It’s a model and method of encoding color information but doesn’t itself define how that information relates to real world values.
A photometric color model based on how we actually perceive color is something different, but equally important to understand. Color as it relates to human vision is defined by the CIE XYZ color model, and all video color spaces are based on it.
We’re going to look at both of these, starting with how color information is encoded in the HSL color model (confusingly also often called the HSL color space), and then move onto the CIE XYZ color model, and finally how a video color space is defined from this.
The science of human color perception, and how this relates to the encoding of these values in different models and color spaces is far beyond the scope of this article. My intention here is to simplify and illustrate very general concepts.
The HSI Color Model
Hue is a value that correlates to the appearance of a color as it relates to a mix of the additive primary colors red, green and blue. This is modelled as an angular value with the additive primary colors, red, green and blue plotted around the edge of a circle. This starts with the red primary at 0°, the green primary at 120° and the blue primary at 240°, before wrapping back to red at 360°. The additive secondaries, which are yellow, cyan and magenta are plotted exactly opposite their primary counterparts. This places yellow at 60°, cyan at 180° and magenta at 300°.
This is the same arrangement of colors you’ll find around the lift, gamma, gain and offset color control wheels in any color grading software. It’s an important concept to understand as it plays a central role in how the color balance of video is manipulated in post production.
Saturation is a value between 0 and 1 that defines the ratio of a particular pure hue to grey. The grey value at 0 saturation is determined by the intensity value.
Lightness is a value between 0 and 1 that defines the ratio of any color to white or black.
Color in Three Dimensions
These three values are often represented in a three dimensional model. A cylindrical model is easy to imagine by plotting hue and saturation on a flat circle. The hue value between 0 and 360 degrees defines an angle from centre of the circle to the outside edge with 100% saturation at the edge, and 0% saturation at the centre. Lightness is added as the third dimension with values from 0 (black) to 1 (white) as the height of the cylinder. Any possible combination of hue, saturation and lightness exists as a point inside the cylinder.
The CIE 1931 XYZ Color Space
In 1931 the ‘International Commission on Illumination’ (CIE) created the CIE 1931 RGB and CIE 1931 XYZ color spaces which for the first time linked the pure spectrum of color (the actual electromagnetic wavelengths of the visible spectrum) with the human perception of color.
Looking at the chromaticity diagram you can see the wavelengths of light (in nanometers) indicated around the outer boundary. The boundary defines the limit of maximum saturation that can be perceived by human vision.
In this diagram you can also see an arc which represents the color of light radiated by black body light sources at various temperatures marked in degrees Kelvin.
The CIE 1931 XYZ color space defines the full extent of every color human vision can perceive.
The Video Color Space
The video technology we all know and love has always been limited to far less than the full spectrum of visible color. A video color space comprises three things. Gamut, White Point and a Transfer Function (Gamma).
A video color space refers to an accepted standard defining a limited set of colors that can be encoded for a particular technology. These limits can be defined as a triangle with Red, Green and Blue extents (primary chromaticities) that are mapped to sit inside the full CIE XYZ space.
The space within the full CIE XYZ space that a particular color space covers is called its Gamut.
For example here you can see the Rec. 709 color space mapped to CIE XYZ. Rec. 709 is the standard for HDTV and is basically the same as sRGB which is the standard for computer displays, printers and the internet.
So a color space has a gamut defining the extents of the colors it can cover, and it also needs a white point. In the Rec. 709 example, the point marked D65 is a single point that actually lies on the arc in the first diagram, it represents white at a ‘daylight’ color temperature of 6500 degrees Kelvin.
A transfer function describes the relationship between the intensity of the primaries and the actual number stored to describe it. For Rec. 709 (and sRGB) this curve closely matches the gamma curve of a CRT display. This non-linear curve allows for a more efficient assignment of the values in relation to the perception of human vision.
Working With Video Color Spaces
The video color space you choose to work in, monitor and output should always match your intended delivery standard for a video. To learn more about choosing the right video space for a project, read Choosing The Right Video Color Space.