Notes on Colour

the RGB cube

I apologise: Java applets are no longer supported in browsers. Please wait until this page is eventually updated.


Theoretically, this computer screen is capable of displaying At present (), most computer programs can deal with about 16 million colours because they use 24-bit colour—224 is a little over 16 million. When a program says it is using 32-bit colour, it usually means it’s using an alpha channel to control transparency, so it’s still using only 24 bits for the actual colours.

The colour of each pixel on your screen is produced from three shining dots. There is one dot for each primary colour—red, green and blue. A dot can shine at a limited number of brightness levels. With 24-bit colour, these levels can be 0 (off), 1, 2, 3… 255 (full on). A dot can have any one of these 256 values. (Each of the 3 primaries uses 8 of the 24 bits, and 28 = 256.)

This means that the 16 million colours of a computer display can be thought of as points inside a 256×256×256 cube in RGB-space. Each colour is made by setting the brightness levels (r,g,b) of three dots. The three values (r,g,b) are the coordinates of a point in 3-space. Instead of the usual xyz axes, this 3-space has rgb axes representing the brightness levels of the red, green and blue dots.