What colour names are supported in HTML?

Page Contents

How colours are expressed in HTML

Colours can be expressed in HTML either by name or by using a hexadecimal
number. The hexadecimal number notation allows the precise quantities of red,
green and blue to be specified. The colour is expressed as a six digit
hexadecimal number, #RRGGBB.
Where 'RR' is the amount of red, between 00
(none) and FF (all), 'GG' is the amount of
green and 'BB' the amount of blue.

Thus for example purple could be expressed as either 'purple' or '#800080',
for example:

Purple <span
style="color:purple">Purple</span>

or

Purple <span
style="color:#800080">Purple</span>

are equivalent.

Gotcha: Be sure to specify the colour tag using the American spelling of
'color' not the British English spelling of 'colour'.

List of colour names supported

Older browsers (such as Internet Explorer 3) support a much smaller range of
names than more modern browsers. All browsers should therefore support these
colours:

Selecting a colour by colour number

Colours can be specified by number as well as by name. Use the following
control to specify foreground and background colours interactively and see what
the result would look like. You can use this with a colour from the colour chart
or use it to make your own selections.

You will need to enable JavaScript for the following to work. You currently have JavaScript disabled.

Red

Green

Blue

Foreground:

style="color:#000000"

Sample
text: "So God created man in His own image, in the image of
God He created him; male and female He created them."
(Genesis 1v27)