Digital Color – Essential Concepts

What is color?

We perceive color through 3 types of cone cells in the retina of our eye – the red, green and blue. Each one of these cells is sensitive to particular range of wavelengths associated with that color. All the colors that we see are combined responses of these three cone types in our eyes.

Additionally, there are also the rod cells, which are sensitive to luminance and tend to operate at low light level. That is why at low light level, although we can still see the shape of objects, it becomes difficult to distinguish the colors.

A normalised absorbance diagram for the cons and rod cells

Gamut

Gamut is a certain subset of colors that can be accurately defined or represented.

When it comes to digital color, not all display devices can display the whole range of gamut that the human eye can perceive. Significantly narrower gamuts are defined as standards for working with digital color – generally referred to as color spaces.

sRGB color space

One of these limited gamut color spaces is the sRGB, possibly the only color space that you need be concerned with unless you are working with color professionally.

Characteristics of sRGB color space

1. sRGB is an absolute color space and not device dependent. Its values can be derived from the CIE XYZ ( tristimulus) , a mathematically defined color space created by the International Commission on Illumination (CIE) based on physical experiments.

Originally developed by Microsoft and HP, sRGB has been adopted as the industry standard for all web display devices. Of course, not all devices display this color space accurately but it is a standard by which manufacturers set their targets.

2. sRGB has one of the narrowest gamut of all color spaces. This is a deliberate trade off to ensure it can be displayed on all consumer devices satisfactorily.

3. It has non linear gamma. Due to the physical properties of CRT monitors, a 50% pixel voltage does not translate to apparent 50% brightness on the screen. To compensate for this, sRGB has a built in compensation so that if a pixel is to be shown at 50% brightness, it is stored at a different premapped value.

As sRGB has become the standard for web display, all consumer monitors, including LCDs are calibrated based on this specification so that images stored in sRGB colors space can be displayed directly without further compensation.

4. For non color managed devices or softwares, it is generally assumed that images stored are in sRGB color space.

5. For professional work, you need to calibrate your monitors to the actual sRGB standard as defined by the CIE XYZ color space.

Color Calibration

As sRGB is a device independent color space, the only way to get accurate calibration is by using dedicated hardware calibration devices. Any software based calibration tool relies on your eyes to match the colors, which tend not to be reliable.

Color accuracy is also affected by a few other factors

1. Background lighting. A color print will look differently under different lighting condition. The same is true to a certain extent with display devices as well. To ensure consistency, the background lighting of the work area need to remain the same throughout the day

2. As display devices aged, the electrical and chemical properties of its components may degrade. That is why professional monitors need to be calibrated at regular time intervals.

Adobe1998 color space

If you are working in colors for print, you may want to manipulate your images in a broader gamut color space. Adobe 1998 is one of those color spaces that encompasses the capability of professional CMYK printers, which is significantly broader than sRGB. Adobe1998 color space is also device independent.

If you work in Adobe1998, you will need a professional monitor that can be calibrated to this standard. Once calibrated, the colors you see on the screen should be the same as the printer output, which in turn can contain color gamut outside those normally displayed on consumer devices.

RAW format

RAW is basically image data that is directly recorded by devices such as digital camera or scanners. RAW is device dependent. Normally these devices will have color profiles that can automatically converts the images into sRGB color space should you choose to.

However, if you are going to work in a color space other than sRGB, saving in RAW and converting directly into that color space will minimise the loss of details due to multiple conversions.

Linear color space

Linear color space is usually used in 3D rendering or compositing applications. Although generally considered as representing the luminance or energy level of a pixel, the actual values in linear color space are dependent on the specific algorithm used for that particular application.

Linear color space means that the color value of the pixel is stored directly and not compensated (gamma corrected) as in sRGB or other non linear color spaces. This is important to ensure the accuracy and consistency of image manipulation or rendering calculations to be performed on the image data.

When working in linear color space, the images need to be converted into sRGB or similar color space for display. Otherwise the image color appears to be unnaturally dark – unless the monitor is calibrated for linear color space (which is very unlikey). Normally this conversion is done at the software level.

Softwares like Nuke allows the display to be converted on the fly to sRGB color space (or other display color space) while maintaining the data in linear color space for storage and processing.

Working with Digital Video

Things do get a bit more complicated when you are working with video.

Rec709 color space

Rec709 color space is used primarily for content to be displayed on HDTVs. It is similar to sRGB but with deeper gamma. An image that is encoded on rec709 colors pace will look slightly darker with slightly more contrast if displayed directly on a typical sRGB monitor.

Studio/ Broadcast levels

Although not strictly a color space issue, this is an important consideration when you are working with digital videos.

There is a practice in broadcast industry, going back to the early analog/digital days to set the black point at the value of 16 and the white point at 236. This is sometimes referred to as broadcast or studio levels.

In video editing software, you work in what is normally referred to as computer RGB. In computer RGB levels, the black point is set at 0 and the white point at 255, to utlise the full 8 bit range of the image RGB channels.

Many video encoder and media players however, taking the cue from broadcast standards set the black point at 16 and white point at 235. Anything 16 and below will be shown as pure black and anything at 235 and above will be shown as pure white, thus clipping any details within these ranges.

Various video editing applications treat this issue rather differently, so it is difficult to make across the board suggestion.

If your videos appears to be clipped, the first thing to try is to remap your levels from 0-255 to 16-235 before encoding it. This can be done using levels filter or other color correction tools.

What is YCbCr?

A color image and its Y, Cb and Cr components

Most video codecs encode the image data in YCbCr format for bandwith efficiency. YCbCr means that instead of RGB, the data is stored based on luma (Y), blue variance (Cb) and red variance (Cr).This is to take advantage of the fact that our eyes are much more sensitive to changes in luminance as compared to chromacity.

YCbCr is not a color space, but an encoding format for RGB values for storage and transfer efficiency. Whenever you work in video editing or compositing application, the data from the digital video will be converted into the current RGB color work space before you can do anything with it.

The importance of understanding YCbCr lies mainly from the perspective of data compression rather than color reproduction.

Side note: Quicktime format

Many people tend to get confused when they think of Quicktime as a standardised video format. Quicktime is actually just a wrapper for various video codecs.

The actual color behaviour of a Quicktime movies will depend on the codec used for that particular video.When discussing Quicktime videos, you must specify the codec used for it to make any sense. The other similar format is the Windows avi.