Named Colours

Specifying colours

You can specify colours in HTML and CSS by their colour
name or by their RGB hexadecimal value.

In HTML4 you can type: <font color="purple"> or <font color="#800080">

In HTML5 you should use: <p style="color: purple">
or <p style="color: #800080">

In CSS you can also use RGB decimal values, eg:

P { color: rgb(128,0,128); }
or

P { color: purple; }
or

P { color: #800080; }
or

HTML colour names

17 colour names are specified in HTML:

Fuchsia

Teal

Orange

White

Purple

Lime

Red

Black

Blue

Green

Maroon

Navy

Olive

Silver

Aqua

Yellow

Gray

CSS colour names

A further 123 colour names are specified in CSS. These are listed in
the table below, together with their corresponding
Hex value, RGB value and Microsoft Access code number. (Colours marked with an asterisk* are
included in the HTML colour set).

To view a colour in more detail, click the colour's name in the
third column. The background will change to
this colour and you will be able to see how the colour appears
in relation to other colours in the list.

To return to a white background, just click the refresh button on your browser.