settings
skip menu
change media type
xhtml+xml
change language
deutsch
scripting
dec -> hex

URI: http://www.j-a-b.net/web/hue/color-names
last updated: 2009-12-04
© 2002-2009 Contact

up down
Subject Index

Colour Names for HTML/CSS and their RGB Values

A huge variety of colour names exists and you may easily find thousands of charts with colour names on the web. Unfortunately, many of these are not applicable to web authoring as they contain non-standard names. In HTML 136 names are allowed and in CSS2.1 only 17 names, based on the 16 VGA colours plus - new in this CSS version - the colour Orange. The first chart lists these valid CSS colour names.

CSS2 Colour Names
colour name
white
#ffffff
yellow
#ffff00
orange
#ffA500
red
#ff0000
fuchsia
#ff00ff
silver
#c0c0c0
gray
#808080
olive
#808000
purple
#800080
maroon
#800000
aqua
#00ffff
lime
#00ff00
teal
#008080
green
#008000
blue
#0000ff
navy
#000080
black
#000000
 

The HTML colour names entirely lack any systematic logic. While some names are easy to memorize, others have totally weird names, like PapayaWhip. Included in the 136 valid HTML colour names are the 17 valid CSS colour names. I have, however, included a couple of more names, which are invalid and must not be used. They serve as a means to show how browsers react to these invalid values. The Opera browsers, for example, does support some of these names due to some strange and unknown reason. Notice, that some names appear twice in the chart. This enables you to compare the standard appearance and the wrong one.

Double Colour Names
colour name
Aquamarine BlueViolet Bronze
CornflowerBlue DarkOliveGreen Khaki
LightSteelBlue Maroon MediumVioletRed
SteelBlue YellowGreen  

No distinction is made concerning uppercase or lowercase letters. It is however highly recommendable to use mixed lettering with regards to readability, as the following example shows:

lightgoldenrodyellow vs. LIGHTGOLDENRODYELLOW vs. LightGoldenRodYellow

The chart has the following structure:
A big cell shows the colour name and beneath the hexadecimal colour value. The background of this cell is styled by using this hexadecimal value. Names marked with an asterisk (*) are non-standard or double names and must not be used in web authoring.
Legend of Colour Chart
There are two smaller cells beneath this big one. In the first of these, named CSS, the background is styled using the CSS syntax while the background of the second cell, named HTML, is styled using the HTML bgcolor property in association with the colour name.

The following example shows how the colour BrightGold is rendered in the browsers Netscape 7.1, Internet Explorer 6.0, and Opera 7.23. Notice, that this colour name is not valid. Netscape totally ignores the name, while Internet Explorer only ignores the CSS value but produces a dark red HTML background colour. The parser obviously takes the letters of the colour name which make sense as hexadecimal values and constructs some new value - in this case B0000D which is then rendered. Opera takes a third approach. This colour name seems to be hardcoded into Operas parser thus Opera renders right backgrounds both for HTML and CSS syntax.

Rendering example in different browsers

The chart may be displayed either in alphabetical order or in order of descending hexadecimal values

choose display method
choose sorting order sorting order: a-z sorting order: value
show chart

no display method chosen

Subject Index

CC logo
This page is licensed under a Creative Commons License.