HTML Colors


In HTML, each color has been assigned an RGB number. The RGB number is a six digit hexadecimal number that specifies the amount of red (first two digits), green (next two digits), and blue (last two digits) that are used to make up the color. Each set of two digits can range from 00 to FF. This allows for 16,777,216 possible colors. 000000 is the RGB code for black, and FFFFFF is the RGB code for white.

Some colors have been given names. These colors can be referenced either by name or RGB number. There are 16 standard color names, which are supported by all browsers. The following are the standard color names, with their RGB numbers:

Black
"#000000"
Silver
"#C0C0C0"
Gray
"#808080"
White
"#FFFFFF"
Maroon
"#800000"
Red
"#FF0000"
Purple
"#800080"
Fuchsia
"#FF00FF"
Green
"#008000"
Lime
"#00FF00"
Olive
"#808000"
Yellow
"#FFFF00"
Navy
"#000080"
Blue
"#0000FF"
Teal
"#008080"
Aqua
"#00FFFF"

There is a set of colors called the "browser safe colors". These colors can be reproduced accurately even on very old monitors that can only display 256 colors. Since almost everyone has better monitors now, we no longer need to worry about using only the browser safe colors.

Additional color names have been defined but may not be supported in all browsers. You can see the extended list of color names at http://www.w3schools.com/tags/ref_colornames.asp

You can see a lot of colors with their color numbers at http://www.colourlovers.com/blog/2007/06/30/ultimate-html-color-hex-code-list.


Email Me | Office Hours | My Home Page | Department Home | MCC Home Page

© Copyright Emmi Schatz 2001