RGB Colour for PDI: The Background

We capture digital images with cameras and scanners, usually in colour, but sometimes in greyscale.

Each digital image can be envisaged as a rectangular array of millions of pixels, or picture elements, arranged in rows and columns in a horizontal and vertical grid.

Greyscale Images

In a greyscale image every pixel in the image is represented as one number, which is typically one byte, of 8 bits. A single byte can hold a range of numbers from 0 for black through to 255 for white. The remaining intermediate values 1 to 254 are used to represent the range of greys. The single byte can thus represent 256 different shades of grey from black through to white.

The whole rectangular array of pixels that form the digital image is represented by a rectangular array of millions of numbers, one for each pixel, the value for each pixel lying within the range 0 to 255.

All these individual numbers for all the pixels in the image are represented in what Photoshop terms a channel. In this case it is a greyscale channel.

RGB Images

In the consumer world digital colour images are usually represented with three colour channels, one for each of Red, Green, and Blue. This kind of image is termed RGB. These three colours of light are mixed to represent or to form the colours of an image. Colour televisions and colour monitors are devices that work in this way. Many digital cameras capture images in this way as the three channels, red, green and blue.

In RGB, each element of a digital picture – each pixel – is again represented by three numbers, one for the red component, one for the green component, and a third for the blue. In the commonest RGB mode each pixel is represented by three 8-bit bytes, one for each of the three colours. Each pixel number can represent 256 different shades (as in the greyscale images discussed above). These shades in the three channels for each pixel are combined to generate the full range of available colours. Theoretically, 8-bit RGB gives about 16 million different colours (256 x 256 x 256). Windows terms this ‘millions of colours’, as against the ‘thousands of colours’ that was common on older computers, which had less powerful graphic cards.

Though it is called 8-bit colour, each pixel actually uses three bytes or 24 bits in total (3 x 8). This is why, for example, an 8 megapixel image in a file from a digital camera might occupy about 24 megabytes when you open it in an image editor like Photoshop. Images are often compressed, say as a JPEG (.jpg) file, making the file appear to be smaller than you might expect.

Many cameras offer ‘16-bit colour’, which uses two bytes (8 + 8 bits) for each of the three channels Red, Green , and Blue. This allows over 65,000 different shades to be represented in each channel. It is worth noting also that many current consumer-grade scanners also can often capture an image in a colour depth of 12-bits or more, and can pass such an image forward as a 16-bit colour image.

At present (2008), most organisers of projected digital image competitions (including WGPS) ask for 8-bit colour images.

If your image is in 16-bit mode, you need to change it to 8-bit mode in image editor like Photoshop before you submit it. (Image>Mode>8-bits per channel.)

© Michael Wood, 26 October 2008.

PDF-Icon.jpgRGB Colour for PDI: The Background

Click the link to open a new window displaying an Adobe Acrobat Reader file (PDF) that you can print and/or save.

Images on this WGPS site are copyright of their respective authors. You must obtain permission to use them. Text may be used for non-commercial purposes with appropriate acknowledgement.