Adding Color
Color is defined with HTML coding through hexidecimal notation (HEX). This is basically a set of 3 paired 2 digit numbers that represent various combinations of Red, Green, and Blue color components. Each numbered color begins with the # sign. The first pair of numbers represents the red hue, the second pair represents the green hue, and the third pair represents the blue hue.
Hex numbers are base sixteen and they run from 0 to 9 and then A through F. The lowest value that can be given to one of the color components is 0 (written as 00 in HEX). The highest value that can be given is 255 (written as FF in HEX).
If the codes for all three colors are set to 0, this represents the absence of color so it displays as black. If all colors are set to FF, then it is every color or white.
The web developer community has recommended limiting color use to 256 web safe colors, that the majority of computers can use to display colors accurately.
Below is a sample of the web safe color palette with each color's associated hexadecimal code.
Hex numbers are base sixteen and they run from 0 to 9 and then A through F. The lowest value that can be given to one of the color components is 0 (written as 00 in HEX). The highest value that can be given is 255 (written as FF in HEX).
If the codes for all three colors are set to 0, this represents the absence of color so it displays as black. If all colors are set to FF, then it is every color or white.
The web developer community has recommended limiting color use to 256 web safe colors, that the majority of computers can use to display colors accurately.
Below is a sample of the web safe color palette with each color's associated hexadecimal code.
Color is an attribute that can be assigned to various tags. For example:
Font Color:
To change the font color for the entire page, name the color in the body tag like this:
<body text="?">
where ? is the # sign and one of the colors from the safe palette above. Be sure to include the quotation marks.
To change the font color for a particular set of text use the <font> tag like this:
<font color="?">Your Text</font>
where ? is the # sign and one of the colors from the safe palette above. Be sure to include the quotation marks.
Page Background Color:
Change the background color of the entire page with code placed within the body tag:
<body bgcolor="?">
where ? is replaced by the # sign and one of the colors from the safe palette above. Be sure to include the quotation marks.
Font Color:
To change the font color for the entire page, name the color in the body tag like this:
<body text="?">
where ? is the # sign and one of the colors from the safe palette above. Be sure to include the quotation marks.
To change the font color for a particular set of text use the <font> tag like this:
<font color="?">Your Text</font>
where ? is the # sign and one of the colors from the safe palette above. Be sure to include the quotation marks.
Page Background Color:
Change the background color of the entire page with code placed within the body tag:
<body bgcolor="?">
where ? is replaced by the # sign and one of the colors from the safe palette above. Be sure to include the quotation marks.