Skip navigation

Provide sufficient contrast in using foreground and background colour combinations by using numbers instead of names for colours.

(see guidelines for overcoming access barriers)

Using hexadecimal numbers instead of predefined names in your style sheets (ie #FF0000 instead of red) gives you more control over how the colours appear.

A Downloadable Colour Contrast Analyser (for Windows only) is available from NILS or an online Colour Contrast Analyser from Juicy Studio.

The following site gives the hexadecimal numbers for the 216 browser supported colors http://en.wikipedia.org/wiki/Web_colors#Web-safe_colors. Your HTML editor (such as Dreamweaver) may also include a browser-safe colour palette from which you can choose.

The example below is taken directly from the stylesheet file linked to this page. Another guideline on this site covers the use of style sheets.

Example:

using the colour style:


body {
   color : #000000;
   font-family : Verdana, helvetica, Arial, sans-serif;
   font-size : 75%;
   margin: 0px;
   background-color: #FFFFFF;
   padding: 0px;
}

Back to top