www.techmind.org logo
by W.A. Steer  PhD
Back to contentsAbout...


 

Introduction to Colour Science

Contrary to popular belief, "colour" is not really an intrinsic property of the things we see around us. Rather, it is the sensation resulting from a given spectral distribution of light, detected by the three colour-sensors in the eye and interpreted by the brain. This page presents a practical overview of colour-science, dispelling some myths along the way and providing some of the best graphics on the subject on the web!

Eye sensitivity - colour matching functions

Experiments in the 1920's enabled the response of the eye to be characterised. Essentially they involved getting students to match spectral colours (monochromatic light) using a colour made by adding varying proportions of red, green and blue "primaries". Many colour-science textbooks begin by explaining this experiment in great detail; I think this is a huge source of confusion so will say no more on the subject for now, and simply present the net result.


CIE 1931 Colour matching functions for 2° observer

The three CIE colour matching functions (CMFs) are called Xbar, Ybar and Zbar, and for practical colour matching and display applications these can be treated as if they were the spectral response curves for the cone-receptors in the human eye. [Actual response curves for the eye are slightly different, but are closely mathematically related.] While it is convenient to think of X, Y and Z as red, green and blue, owing to their wide band and substantial overlap (especially of X and Y), this is a crude approximation. Furthermore, the X (red) function has a second lobe in the shortwave end of the visible spectrum!

It is important to note that because of the overlap of the functions, they are not fully independently stimulable, i.e. no physical light source can stimulate one channel while maintaining zero in the other two (although you can get close with the X channel by stimulating it with longwavelength red light).

A "colour" is defined by the relative stimulus of the eye's XYZ channels (the actual magnitudes will define the brightness or intensity). It makes sense therefore to define a colour by an xyz triplet which are normalised versions of XYZ:

X
Y
Z
x = 
-----------
y = 
-----------
z = 
-----------
X + Y + Z
X + Y + Z
X + Y + Z

Of course, by definition now,  x + y + z = 1 .   As such, only two out of the three xyz coordinates are needed to uniquely define a colour.

It is conventional to define colours by their x,y coordinates. This then gives rise to the CIE chromaticity diagram...

1931 CIE Chromaticity diagram

The chromaticity diagram plots the entire gamut of human-perceivable colours by their xy coordinates defined earlier.


1931 CIE Chromaticity diagram

Other colour-space coordinate systems and plots exist; examples include CIE 1976 u,v, also CIELUV, CIELAB... in general, by means of fairly abstract transforms these attempt to be more perceptually-uniform (with only limited success). Their use is fairly specialised. The simple and direct relation between CIE x,y and the eye-response functions probably accounts for its enduring popularity.

I think nicely-plotted chromaticity diagrams are very attractive, as well as educational, so will oblige in making some high resolution versions available for download...

You often see badly plotted (misleading and/or seriously chromatically inaccurate) chromaticity diagrams; see my Rogues Gallery for examples of what often goes wrong, and why!

Colour in the real world

Colour in computers, television, and graphics

Gamut

Different display technologies (CRT, florescent-backlit LCD, LED-backlit LCD, plasma panel, inkjet printer, laser printer) can have inherently different colour gamuts. Good colour-management practice can ensure comparable reproduction of many colours, but very saturated colours, even if obtainable on one device, are likely to lie outside the gamut of another. All strategies for dealing with out-of-gamut colours involve a "fudge" of some sort. The primary colours of laptop computer, PDA, and mobile-phone displays are often less saturated than those found on mains-powered equipment. This allows greater brightness at a given battery-life, but reduces the available colour gamut by shrinking the triangle on the chromaticity diagram.

Any red, orangey or yellow coloured lightsource or reflective surface which has essentially no energy at wavelengths shorter than around 550nm will have a visual colour lying right on the edge of the chromaticity diagram locus, and thus outside the sRGB gamut. Yellow and orange flowers such as daffodils and pansies are examples. Furthermore, the deep red petals of flowers such as a rose or camellia often lie outside (below and to the right) of the red-corner of the sRGB gamut. This is one reason why in photographs you may find it difficult to obtain satisfactory-looking colours of some types of flowers.

 

In the photo on the left my camera has rendered the camellia brighter and more orangey than in real life, while in the different lighting on the right it has come out too pink (desaturated). When I illuminated this flower using a quartz-halogen spotlight and measured colours from it using a precision spectrophotometer I obtained a spread of colour-coordinates with several readings extending down to CIE x=0.68, y=0.30 .

 

On a related topic, I've written a page illustrating the problem of reproducing realistic-looking "rainbow" spectra on a display.

Whitepoints and Colour-temperature

While a white object simply reflects or scatters all colours (visible wavelengths) equally. Defining a 'white' light source is slightly less straightforward... I've written a page with notes on whitepoints and colour-temperature.

Brightness and contrast

You have little hope of getting accurate colour reproduction on your television or monitor if you brightness and contrast controls are improperly set. Charles Poynton is eager to lecture you on this; see http://www.poynton.com/notes/brightness_and_contrast/index.html. Unfortunately the exact effect of "brightness" and "contrast" controls on LCD monitors is very poorly defined (sometimes the "brightness" control adjusts the backlight brightness, and sometimes that is a separate control...) and some experimentation may be required.

Gamma

RGB values used on computers (typically in range 0-255) and analog and digital TV signals are almost guaranteed not to be directly proportional to light output from the screen. The eye/brain does not respond linearly to light intensity, but approximately logarithmically. RGB values are conversely non-linearly scaled so that they approximate to "equal" steps of perceived brightness. This non-linear scaling of RGB data is known as gamma-coding. Any image-processing or manipulation process ought to be aware of the particular gamma-coding parameters in use, if brightness- (and hence colour-) errors, and other artifacts, are to be avoided.
Again, Pointon has some good notes on gamma processing and standards: http://www.poynton.com/GammaFAQ.html.
The sRGB specification (see below) for monitors and PC graphics attempts to standardise a gamma-coding and RGB primary set.

Further reading

http://www.poynton.com/ - website of Charles Poynton; digital imaging considerations
http://www.cie.co.at/cie/ - website of the CIE
http://www.w3.org/Graphics/Color/sRGB - sRGB specification
http://www.cis.rit.edu/mcsl/online/cie.php - CIE matching function raw data, including in 1nm (interpolated) steps


Created: October 2004
Last modified: 15 March 2008

Source: http://www.techmind.org/colour/

©2004-2008 William Andrew Steer
andrew@techmind.org