FYI: Learn HTML

 

CWIRE Main Menu
Shop CWIRE Select Merchants

Robert Marston
About the Editor
Robert Marston

CWIRE.COM is maintained on a volunteer basis by Glendale resident Robert Marston for the benefit of the local community.

Please express your support for CWIRE through a "high five" donation of $5. Your annual contribution helps to defray the cost of hosting and buys ad specialties for over 400 local charities.

Thank you!


  FYI: Learn HTML
HTML Background Colors

  To set the background color of a webpage or a table, you may use the name of the color, or the HTML equivalent (the hexidecimal color code). The chart below shows a bunch of colors you can choose.

There are actually only 212 different HTML colors. (The chart below shows some duplicate colors.)

Your mileage may vary.
Keep in mind that your eyes will play tricks on you when you're looking at the chart below. The same color swatch will show-up differently when you place it in a different context, surrounded by different colors.

Colors always appear differently, depending on their contexts. That's because our eyes automatically exaggerate contrasts between adjacent colors. This makes it pretty difficult to pick-out exactly the right color from the chart. You will probably need to experiment a little, or choose a few good color codes that are easy to memorize.

You may use the color codes below to set the background color (BGCOLOR) for the entire page (<BODY>), or for a Table (<TABLE>), Row (<TR>), Header Row (<TH>), or a Cell (<TD>). Upper and lower case don't matter with these codes. Notice how the cell color -- if specified -- overrides the row color (see "Helen Keller"), and the row color -- if specified -- overrides the overall table color.

 

 
 

Example:
This HTML code...

<TABLE BGCOLOR="#FFFFCD" BORDER=1>
<TH BGCOLOR="#BB7777">Quote</TH><TH BGCOLOR="#CD9999">Source</TH>
<TR>
<TD>Why should we just take what we get, when we can choose exactly what we want?</TD><TD>John Renesch</TD>
</TR>
<TR BGCOLOR="#00CC99">
<TD>We can do anything we want if we stick to it long enough.</TD><TD BGCOLOR="#FFFFFF">Helen Keller</TD>
</TR>
<TR>
<TD>There are periods when...to dare, is the highest wisdom.</TD><TD>W.E. Channing</TD>
</TR>
<TR BGCOLOR="#00CC99">
<TD>Mistakes are their own instructors.</TD><TD>Horace</TD>
</TR>
</TABLE>
...produces this table:

Quote Source
Why should we just take what we get, when we can choose exactly what we want? John Renesch
We can do anything we want if we stick to it long enough. Helen Keller
There are periods when...to dare, is the highest wisdom. W.E. Channing
Mistakes are their own instructors. Horace

 

Note: Be sure to use a # (pound sign) in front of the codes shown below, and enclose the # and code with double-quotes, as shown above. These codes are not the only ones: you may use any hexidecimal number between 000000 and FFFFFF, such as BB7777 shown above. However, you'll find that HTML only supports 212 different colors.

 

The following chart shows various colors and their corresponding RGB color codes in 6-digit hex-tripletl form. The first two digits represent the saturation of red, the middle two represent green, and the last two represent blue. So FF0000 means "100% red, mixed with 0% green, and 0% blue," which is pure red. (See the hexidecimal to decimal conversion chart.)

000000 003300 006600 009900 00CC00 00FF00
000033 003333 006633 009933 00CC33 00FF33
000066 003366 006666 009966 00CC66 00FF66
000099 003399 006699 009999 00CC99 00FF99
0000CC 0033CC 0066CC 0099CC 00CCCC 00FFCC
0000FF 0033FF 0066FF 0099FF 00CCFF 00FFFF

 

330000 333300 336600 339900 33CC00 33FF00
330033 333333 336633 339933 33CC33 33FF33
330066 333366 336666 339966 33CC66 33FF66
330099 333399 336699 339999 33CC99 33FF99
3300CC 3333CC 3366CC 3399CC 33CCCC 33FFCC
3300FF 3333FF 3366FF 3399FF 33CCFF 33FFFF

 

660000 663300 666600 669900 66CC00 66FF00
660033 663333 666633 669933 66CC33 66FF33
660066 663366 666666 669966 66CC66 66FF66
660099 663399 666699 669999 66CC99 66FF99
6600CC 6633CC 6666CC 6699CC 66CCCC 66FFCC
6600FF 6633FF 6666FF 6699FF 66CCFF 66FFFF

 

990000 993300 996600 999900 99CC00 99FF00
990033 993333 996633 999933 99CC33 99FF33
990066 993366 996666 999966 99CC66 99FF66
990099 993399 996699 999999 99CC99 99FF99
9900CC 9933CC 9966CC 9999CC 99CCCC 99FFCC
9900FF 9933FF 9966FF 9999FF 99CCFF 99FFFF

 

CC0000 CC3300 CC6600 CC9900 CCCC00 CCFF00
CC0033 CC3333 CC6633 CC9933 CCCC33 CCFF33
CC0066 CC3366 CC6666 CC9966 CCCC66 CCFF66
CC0099 CC3399 CC6699 CC9999 CCCC99 CCFF99
CC00CC CC33CC CC66CC CC99CC CCCCCC CCFFCC
CC00FF CC33FF CC66FF CC99FF CCCCFF CCFFFF

 

FF0000 FF3300 FF6600 FF9900 FFCC00 FFFF00
FF0033 FF3333 FF6633 FF9933 FFCC33 FFFF33
FF0066 FF3366 FF6666 FF9966 FFCC66 FFFF66
FF0099 FF3399 FF6699 FF9999 FFCC99 FFFF99
FF00CC FF33CC FF66CC FF99CC FFCCCC FFFFCC
FF00FF FF33FF FF66FF FF99FF FFCCFF FFFFFF

For each RGB color (red, green, & blue) there are 6 safe (acceptible, standard) levels: 00, 33, 66, 99, CC, & FF. So there are a total of 216 "standard" colors (6 degrees of red x 6 degrees of green x 6 degrees of blue).

 
 
CWIRE Main MenuShop CWIRE Select MerchantsFYI: Learn HTML

Please report errors, omissions, or technical problems to
the CWIRE Community Editor

URL: http://cwire.com/pub/FYI/HTML/colors.asp
Viewed: 12/11/2017 6:24:51 AM
Last Modified: December 28, 2002 3:49 PM
Source: Robert Marston (1999)
URLID: /pub/FYI/HTML/colors.asp



CWIRE supports local charities by 1) helping them to create and promote
independent websites, 2) promoting their events, 3) syndicating their newsletters and
press releases, and 4) recruiting volunteers and donors in the nearby Los Angeles area.
Please support CWIRE by advertising with us (or supporting those who do), by referring
new merchants, by sending us information to post, and by telling others about CWIRE.
HTML and scripts by Robert Marston Copyright © 2004-2013 Community Wire Service unless
otherwise noted. All rights reserved.