Home Misc Index
  HTML Colors
 P van Diemen

Contents

Color Table

Colors in HTML are indicated by 6 hexadecimal digits, 2 hex digits for each of the colors red, green and blue respectively (i.e. rrggbb).  So 000000 is black, FFFFFF is white, FF0000 is pure red, FFFF00 is yellow, and C0C0C0 is light gray.
Formally, the color codes need a preceding number sign and enclosing double-quotes (e.g. color="#FF0000"), but in many case you can do without them.

Alternate methods to indicate colors is via predefined names (see Predefined color names), or (at least in style sheets) using rgb( 0-255, 0-255, 0-255 ) or rgb( 0%-100%, 0%-100%, 0%-100% ).

The table below provides a selection of the color palette.  Note that the table covers only a small portion of the possible combinations:  the light colors are stepped with an interval of x20, and only a minor part of the dark colors are presented.
00000000202000404000606000808000a0a000c0c000e0e000ffff00e0e000c0c000a0a0008080006060004040002020000000
00200000402000604000806000a08000c0a000e0c000ffe020ffff00e0ff00c0e000a0e00080a0006080004060002040000020
00400000602000804000a06000c08000e0a000ffc020ffe040ffff20e0ff00c0ff00a0e00080c00060a0004080002060000040
00600000802000a04000c06000e08000ffa020ffc040ffe060ffff40e0ff20c0ff00a0ff0080e00060c00040a0002080000060
00800000a02000c04000e06000ff8020ffa040ffc060ffe080ffff60e0ff40c0ff20a0ff0080ff0060e00040c00020a0000080
00a00000c02000e04000ff6020ff8040ffa060ffc080ffe0a0ffff80e0ff60c0ff40a0ff2080ff0060ff0040e00020c00000a0
00c00000e02000ff4020ff6040ff8060ffa080ffc0a0ffe0c0ffffa0e0ff80c0ff60a0ff4080ff2040ff0040ff0020e00000c0
00e00000ff2020ff4040ff6060ff8080ffa0a0ffc0c0ffe0e0ffffc0e0ffa0c0ff80a0ff6080ff4060ff2040ff0020ff0000e0
00ff0020ff2040ff4060ff6080ff80a0ffa0c0ffc0e0ffe0ffffffe0e0ffc0c0ffa0a0ff8080ff6060ff4040ff2020ff0000ff
20ff0040ff2060ff4080ff60a0ff80c0ffa0e0ffc0ffffe0ffe0e0ffe0ffe0c0ffc0a0ffa080ff8060ff6040ff4020ff2000ff
40ff0060ff2080ff40a0ff60c0ff80e0ffa0ffffc0ffe0c0ffc0c0ffc0e0ffc0ffe0a0ffc080ffa060ff8040ff6020ff4000ff
60ff0080ff20a0ff40c0ff60e0ff80ffffa0ffe0a0ffc0a0ffa0a0ffa0c0ffa0e0ffa0ffe080ffc060ffa040ff8020ff6000ff
80ff00a0ff20c0ff40e0ff60ffff80ffe080ffc080ffa080ff8080ff80a0ff80c0ff80e0ff80ffe060ffc040ffa020ff8000ff
a0ff00c0ff20e0ff40ffff60ffe060ffc060ffa060ff8060ff6060ff6080ff60a0ff60c0ff60e0ff60ffe040ffc020ffa000ff
c0ff00e0ff20ffff40ffe040ffc040ffa040ff8040ff6040ff4040ff4060ff4080ff40a0ff40c0ff40e0ff40ffe020ffc000ff
e0ff00ffff20ffe020ffc020ffa020ff8020ff6020ff4020ff2020ff2040ff2060ff2080ff20a0ff20c0ff20e0ff20ffe000ff
ffff00ffe000ffc000ffa000ff8000ff6000ff4000ff2000ff0000ff0020ff0040ff0060ff0080ff00a0ff00c0ff00e0ff00ff
 

Predefined Color Names

Some common colors have been predefined by name.
 Black= "#000000"  White= "#ffffff"
 Gray= "#808080"  Silver= "#c0c0c0"
 Red= "#ff0000"  Maroon= "#800000"
 Yellow= "#ffff00"  Navy= "#000080"
 Green= "#008000"  Lime= "#00ff00"
 Olive= "#808000"  Teal= "#008080"
 Blue= "#0000ff"  Aqua= "#00ffff"
 Purple= "#800080"  Fuchsia= "#ff00ff"
 Orange= "#ffa500"
 

Test Box

 Foreground
 
   
 
 background 
Foreground ^ ^ ^ ^
RGB:
v v v v
 
Background ^ ^ ^ ^
RGB:
v v v v
Enter new values for foreground and/or background color as hexadecimal or decimal (RGB) value in the appropriate input boxes, or click on the arrows
 

=O=