Last Updated March 13, 2014
Colour plays a vital part in computer graphics and realistic scenes cannot be generated without a suitable range of colours available. But there are many competing ways to specify colour, each method has its good and bad points.
Visible light, ultraviolet light, x-rays, TV and radio waves, etc are all forms of electromagnetic energy which travels in waves. The wavelength of these waves is measured in a tiny unit called the Angstrom, equal to 1 ten billionth of a meter. Another unit sometimes used to measure wavelength of light waves is nanometers (nm) which are equal to 1 billionth of a meter.
There is a narrow range of this electromagnetic energy from the sun and other light sources which creates energy of wavelengths visible to humans. Each of these wavelengths, from approximately 4000 Angstroms to 7000 Angstroms, is associated with a particular color response. For example, the wavelengths near 4000 Angstroms (400 nm) are violet in color while those near 7000 (700 nm) are red.
The colours we see 'see' at certain wavelengths do not exist in reality, they are created by our brain. Issac Newton said
... the Rays to speak properly are not coloured. In them there is nothing else than a certain Power and Disposition to stir up a Sensation of this or that Colour.
It was discovered long ago by artists, that (almost) any colour can be described interms of a combination of 3 primary colours. This resuts from the way we detect light. The Human retina has cells called "cones" which detect either red, green or blue wavelengths of light.
This model is the traditional form of colour specification in computer graphics. Colours are defined as a triple of values, each value representing the intensity of the red, green or blue component of the colour. In this system;
The number of discreet colours that can be generated by this system is determined by the number of bits assigned to represent each colour. In a 24-bit system (photorealistic) there are 8 bits for each colour component, giving $256 \times 256\times 256=16\textrm{million}$ different colours. This system was first developed as a consequence of the way the human eye works. The eye contains receptors for red, green and blue light respectively, the brain combines these three 'readings' to give the perception of one colour. This however is a simplified view of how the eye actually works. This model also corresponds closely with the way most graphic displays work. Each pixel on a monitor has a red, green and blue component. The colour of a pixel can be controlled by varying the relative brightness of each component.
The 3 components of the RGB system describe a region in colour space called the RGB Cube. Each of the three primary colors form mutually perpendicular axes.
However the system is not perfect.
Again a triplet of values is used.
The HSV system is usually shown as a hexagonal cone (hexcone).
HSV values can easily be converted into RGB values for display. The two systems describe the same set of colours. One problem with this system is that it implies that all maximum intensity colours have the same brightness (value), however looking at blue and yellow show this is obviously not the case in reality. Also this system is perceptually non-linear (similar to RGB), and does not represent all perceivable colours.
Similar to the HSV model except the value axis has been replaced with a lightness axis which has been stretched to form a double Hexcone.
Now white and black have the same geometric status. However the saturated hues now occur at L=0.5 which can be a problem for intuitive colour selection.
© Ken Power 2011