Colour Mapping and Direct Colour

KS3 Computer Science

11-14 Years Old

48 modules covering EVERY Computer Science topic needed for KS3 level.

GCSE Computer Science

14-16 Years Old

45 modules covering EVERY Computer Science topic needed for GCSE level.

A-Level Computer Science

16-18 Years Old

66 modules covering EVERY Computer Science topic needed for A-Level.

GCSE Theory Topics Resources (14-16 years)

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module

A-Level Data types, data structures and algorithms (16-18 years)

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module

Pupil Resources – EXTENSION TOPIC

What is the difference between Colour Mapping and Direct Colour?

Colour mapping

With low colour depths (up to 8-bit) it is practical to map every colour to a binary code.

  • 1-bit colour mapping – (2 colours) monochrome, often black and white.
  • 2-bit colour mapping – (4 colours) CGA – used by many early home computers with TV displays 4-bit colour mapping – (16 colours) – used by CGA (Colour Graphics Adapter) graphics cards
  • 8-bit colour mapping – (256 colours) – used by VGA (Video Graphics Array) graphics cards at low resolution.

Direct colour

As the colour depth increases, the number of possible colours makes it impractical to map out a colour for each binary code. In higher colour depths therefore the colour value typically encodes the relative brightness of Red, Green and Blue to specify a colour in the RGB colour model.

For example, if 24-bit direct colour was used then 255,255,0 would be the code for Yellow (maximum red and green and zero blue). In binary, this would be encoded as 11111111, 11111111, 00000000.

  • 8-bit direct colour – very limited colour display, 3 bits are used for both the R and G component. The normal human eye is less sensitive to the B component than to the red or green, so it is assigned 2 bits (four levels), enabling 256 (8 × 8 × 4) different colours.
  • 12-bit direct colour – this uses 4 bits for each of the R, G, and B components, enabling 4,096 (16 × 16 × 16) different colours at 16 different levels each. This colour depth is sometimes used in small devices with a colour display, such as mobile phones.
  • 16-bit direct colour – this is considered sufficient to provide life-like colours. Many schemes use 5 bits to represent red, 5 bits to represent blue, but (since the human eye is most sensitive to the colour green) use 6 bits to represent 64 levels of green. These can therefore be combined to give 65,536 (32 × 64 × 32) different colours.
  • 18-bit direct colour – Almost all cheap LCD displays use 18-bit colour (64 × 64 × 64 = 262,144 colour combinations)
  • 24-bit direct colour (16,777,216 colours) – This approaches the level at which a megapixel monitor can display distinct colours for photographic images. It uses 8 bits to represent red, 8 bits to represent blue and 8 bits to represent green so 256 levels of each of these three colours can therefore be combined to give the total of 16,777,216 distinct colours (256 × 256 × 256).
  • 32-bit direct colour – if ten to eleven bits were used per RGB channel it would be possible to produce over 4.2 billion distinct colours. However this is above what megapixel monitors can distinguish so it is pointless to use all the bits just for the colour data. The term 32-bit colour is therefore often a misuse, referring to 24-bit colour images with an additional eight bits of non-colour data.

Further Readings: