# Cracking the colour code

## Cracking the colour code In hypertext markup language (HTML) colours are represented in a standard manner using the hexadecimal system. A prefix of # is followed by 6 hexadecimal digits: |

- the first two digits represent the red component

- digits three and four represent the green component

- digits five and six represent the blue component.

Coding colours using the hexadecimal system means that you can refer to a specific colour and it will not be dependent on human judgement or the settings on your screen.

Find your colour

You can use the Colour Constrast Analyser application to identify the hexadecimal code used for particular colours. Open Find your colour (.docx 240kB) for instructions.

Colour it up

Interested in web design?
A Cascading Style Sheet (CSS) is a document written in markup, or style sheet language that provides instructions on the look and feel of a HTML product. This includes aspects such as colours, layout and fonts (for example laptop wraps all use the same CSS documents to ensure they have the same appearance). Using a CSS to control appearance improves accessibility because the same content can be presented in different styles for different purposes, for example on-screen, in print and by a screen reader. You don’t have to change the content, just the CSS. With a CSS the user has more control over presentation, for example a person with vision problems for a particular colour can alter the CSS or even substitute their own. Colours are specified in CSS documents using hexadecimal code.

For this exercise you will need to have a downloaded copy of this laptop wrap on your computer so you can access the CSS. If you do not already have a copy then search the Scootle website for Colour by numbers. Download the zipped file and ‘extract all’. Open Colour it up (.docx 27kB) for instructions on how to change colour in the CSS.