Bitmaps   page 2

Just to recap; a picture with a colour depth of 24 bits per pixel can have 256 shades of each of the three primary colours, red green and blue.

Effectively, then, a 24 bit image can have 256 x 256 x 256 combinations of colours/shades and this comes to the famous number, 16.8 million.

This may at first strike you as being an absurdly high number, but the reason it isn't is explained by the example on the previous page; in exceptional cases, even though you have a palette of 16.8 million to choose from, there will be images like our blue sphere when we can only use 256 and these are just enough to give the viewer the impression of a seamless gradation.

Before we look at some alternatives to 24 bits, please be aware that you will sometimes find this colour depth referred to 8 bits per colour. As there are three colours per pixel, this is the same as saying 24 bits per pixel, but can be confusing.

Here are some commonly used colour depths:

    1 bit per pixel  =  2 colours, (that is pure black or pure white ONLY)

    8 bits per pixel  = 256 possible colours*

    24 bits per pixel = 16,777,216 possible colours = “true colour”

*greyscale palettes are also usually 8 bits per pixel, but are only used to show 256 shades of grey, from black to white

You will encounter even higher colour depth values on some scanners and will also find that high-end graphics work for cinema use needs more colours. The more colours available, the smoother the transitions between colours.

One question that may have struck you when we discussed the appearance of the blue sphere on page 1 is how we could show a lighter colour than a primary. Since the RGB value of 0,0,255 is the most blue possible in a 24 bit image, how do you create a lighter blue? You cannot exceed the number 255 in a 24 bit colour depth image.

sphere graded from light blue to black

The answer is, we add more red and green. In the image above, the lowest part has RGB value 0,0,0 and the middle part is pure blue, that is RGB value 0,0,255. This gradates to the lightest shade at the top which is RGB value 230,230,255. If it helps, think of the colour at the top of the sphere as being a light neutral grey, almost white in fact, (230,230,230) with a touch of extra blue (25 more).

There is a just a hint of banding in the above image and there are two standard ways of reducing this if necessary; the first way is simply to use a colour depth greater than 24, an option that may or may not be available. Another method is to use dithering.

 page 3             "Pixels and Pegbars" contents             home