An RGB colour space .

The word 'space' is used to describe a mathematical model that has 2, 3 or more dimensions, and where the dimensions have numbers. In high-school mathematics we learned about 2-dimensional spaces with two axes, x and y. A number pair, like (7, 3) represents a point in that space.

An RGB colour space has 3 dimensions. Each number triple represents a unique colour.

Standardising colour numbers

Humans can see literally millions and millions of different colours in the real world. Every one of those colours can be made up by mixing differing proportions of ‘pure’ primary colours: red, green, and blue. For example a purplish colour is composed of a lot of red and a lot of blue but little or no green.

However, communicating unambiguously about colour is problematic. What is ‘red’? People describe quite a large range of different colours as ‘red’. Most leaves are ‘green’ but few different plants have leaves which people would agree are the same shade of ‘green’.

RGBcolorsolidcube1Around 1920 an organisation called the C.I.E. came up with the notion of an RGB colour model to standardise the descriptions of all the colours that humans can see. Experts agreed on particular wavelengths of light to be ‘pure’ red, ‘pure’ green, and ‘pure’ blue, then the colour model was represented in a 3-dimensional graph as in the picture (sourced here).

In the RGB colour model, the components of colour are represented on the axes of the graph which go from zero (no colour), out to maximum saturation for each of the 3 primary colours. Where the colour intensity is zero on all rgbcubeaxesthree axes: no red, no green, no blue, we have no colour: i.e. black. Where the colour intensity is maximum on all three axes, the combined colour is white. A good model to explore this can be found here.

To represent the C.I.E colour model on a computer we need to assign numbers to the colours. In an 8-bit system, the red component of a colour is represented by a number from 0 to 255 corresponding to none (0) to most saturated (255). Similarly for green and blue.

Every other colour can be described by referencing the amount of red, green or blue that makes it up. Colour (x,y,z) has ‘x’ amount of red, ‘y’ amount of green, and ‘z’ amount of blue.

In an 8-bit system a computer can represent 256 x 256 x 256 = 16,777,216 different colours altogether. From 0,0,0 (black) to 255,255,255 (white).

In the C.I.E model (and the other theoretical colour spaces based on it) equal amounts of red, green, and blue result in grey. In an 8-bit system, (10,10,10) , for example, represents a very dark – near black – grey. (200,200,200) represents a light grey. Real-world devices like digital cameras, monitors and printers don't necessarily record or represent grey by equal numbers for red, green, and blue because their respective technologies — filters, inks, LEDs etc — cannot be manufactured to record or display perfectly, standard colours for red, green or blue.

We can’t represent the whole C.I.E colour on this site because it is impossible to represent all of the visible colours in printer ink or on a computer monitor.

The CIE colour space is the basis of the number system all computer-based photographic software uses to record and store digital colour iimages.

However, real-world physical devices cannot represent all colours. So key organisations have invented smaller (digital) colour spaces — subsets of the CIE space — which assign the numbers 0 to 255 to only those colours that devices can deal with, and don't attempt to represent the colours that real devices can't record or make.

This is where things get a bit tricky because there have been a few competing inventions! Of most interest to photographers are: sRGB, Adobe RGB, ProPhoto RGB and the CIE L*a*b* colour spaces.

Essentially, the difference between the RGB colour spaces is how saturated are the red, green, and blue to which you assign the biggest number (255) in each space. CIE L*a*b* is another whole story!

...back about sRGB, Adobe RGB and ProPhoto RGB