Colour spaces. Standardising colour numbers
It turns out that every colour can be described uniquely by a set of 3 numbers.
However, a set of numbers such as (180, 74, 89) could represent any colour, unless a known standard scale is used for the numbers. For cameras and output devices (printers, monitors) the scale is defined by the physical characteristics of the device. But in the abstract, device-independent world the numbers are meaningless unless a unique colour is assigned to each possible triple.
A colour space is simply a scheme for assigning numbers to known colours so that a computer can store and manipulate colour information.
There's no magic to assigning numbers to colours. It's more or less arbitrary. In the RGB schemes the only common thing is the order of the numbers in the triples — the first digit represents he amount of red in the colour, the sencond the amount of green, and the third the amount of blue.
The most widely-used 'standard', device independent, RGB colour spaces (of which sRGB, AdobeRGB, and ProPhotoRGB are examples) use different sets of numbers to describe the same colours and also differ by the range of colours they try to represent.
sRGB was defined by Microsoft. sRGB is a colour space that limits the colours it tries to represent to only those that could be printed on every known monitor and inexpensive printer at the time.
In the sRGB colour space, 255 is assigned to a red that is easily within the gamut of any monitor or printer. Similarly it assigns 255 to a green that easily displayed, and likewise for blue.
Ordinary monitors have a colour gamut that close to the gamut of sRGB. High-end monitors and many inkjet printers can display many more colours than are contained in the sRGB colour space.
At the other end of the scale is ProPhoto RGB, designed by Kodak. ProPhoto RGB contains every colour that any physical device could ever hope to be able to display.
In ProPhoto RGB, the red that is assigned 255 is more saturated than most devices can reproduce, and closer to CIE's definition of 'pure red'. Similarly for green and blue.
As far as I know, there is no real device that can reproduce all of the colours in the ProPhoto RGB space. You would never have trimmed colours if you sent someone an image represented in ProPhoto RGB. (But, as I will explain on the next page, you'd have to be sure they know that your image is saved in that space to avoid awful-colour issues.)
In between sRGB and ProPhoto RGB is Adobe RGB. Adobe realised that cameras, many modern printers, and good monitors can display more colours than Microsoft originally imagined. At the same time they saw no point in assigning numbers to colour values that few or no devices could display. Adobe RGB contains more colours than sRGB, but fewer than ProPhoto RGB, and all contain fewer than the human eye can see! As the end of 2012 only a few high-end 'wide-gamut' monitors can reproduce more than 90% of the colours in the Adobe RGB colour space.
The tricky part
sRGB, AdobeRGB and ProPhotoRGB are systems that assign numbers to real visible colours.
(255,0,0) is assigned to the "most red" colour in the space - in the pictures above that's at the red corner of the triangle. You can see that (255,0,0) does not represent the same colour red in the sRGB, Adobe RGB and ProPhoto RGB colour spaces.
Similarly (0,255,0) is assigned to the "most green" colour in the space, and (0,0,255) assigned to the "most blue" colour. But it is apparent from the pictures that the "most green", and "most blue" colours are different in different colour spaces.
Digital photographers who understand this idea are in a good position to get rich, satisfying colours in their prints. On the other hand, making wrong colour space assignments when sending files to print can result in ghastly and expensive mistakes!
Andrew Rodney has done a very informative video explaining the impact of colour space decisions in relation to real image data here.