1.2.2. Colour Depth
A bit is the basic information unit used in computing theory and practice. A single bit can represent two states, normally 0 / 1 or true / false. In our case a single bit allows us to distinguish two different colours. Often these will be considered black and white. With n bits we are able to produce 2n colours. 4 bits for example allow to represent 16 different colours. Therefore the colour depth of an image tells us how many colours are used to visualise the image.
Very often one byte (one byte is
composed of 8 bits) is used for each primary colour (e.g. red, green and blue).
Thus, the range of every colour is 28
= 256 and it therefore goes from 0 to 255, whereas 0 stands for the lowest and
255 for the highest intensity. Consequently, by combining all primary colours,
28*28*28 or 256*256*256 = 16.777.216 different colours can be produced.
The following colour depths are most common:
Colour Depth | Name | Code | Number of Presentable Colours | Example Picture |
---|---|---|---|---|
1 Bit | Black and White | Black: 1 Bit | 2 | |
8 Bit | Greyscale | Black: 8 Bit | 256 | |
16 Bit | High Colour | Red: 5 Bit Green: 5 Bit Blue: 6 Bit |
216 = 65'536 | |
24 Bit | True Colour | 1 Byte (8 Bits) per R, G and B | 224 = 16'777'216 | |
32 Bit | True Colour with 8-Bit channel | 1 Byte (8 Bits) per R, G, B and α (α includes a value for the transparency of the pixel) | 224 = 16'777'216 + α |