Colors, background images, are some of the items that are controlled
by the <BODY> You can control the color of the background,
text, and links in your home page by using the <BODY> tag.
To control the various colors on your page, the <BODY> tag is
written like this :
<BODY BGCOLOR="#xxxxxx" TEXT="#xxxxxx" LINK="#xxxxxx" VLINK="#xxxxxx" ALINK="#xxxxxx">
You can include any of the items
(bgcolor, text, link, vlink or alink), or leave any one of them out.
To set the color of the background (bgcolor), text, link, visited
link (vlink), or active link (alink), substitute a color value for
the xxxxxx in the sample above. Remember not make them all the same
color, or you won't be able to see anything on your page.
Here are a few examples of color values that you can use:
White = FFFFFF
Yellow = FFFF66
Red = FF0000
Grey = CC9999
Blue = 0000FF
Green = 00FF00
Black = 000000
Purple = CC33FF
Lt. Blue = 00CCFF
These values represent the hexidecimal value of the
red/green/blue combination that makes up the color. Ok, at this
point you're asking what is a hexidecimal (hex) value? In short this
means the six numbers and/or letters that make up a color code for HTML
(example: "#345edc"). When you see
a color you like on another home page (or in my free border collection),
you can use the "view source" feature of your browser to
see the code for that color.
If you have the red/blue/green values and would like to turn them
into hex values, use the following method (a calculator, and
a piece of paper WILL come in handy for this). Each hex value
is made up of the numbers 1- 9 and the letters a - f, they are always
made up of six numbers and/or letters. The following table gives you
an example of the numbers and their equivalent values.
(you might want to copy this table this on a note pad for future use)
The formula for changing the r/b/g values into the hex value
Say you have a red value of 123.
Divide 123 by 16. (123 / 16 = 7.6875)
The first numbers you come up with will be 7.6875.
The number before the decimal (7) will be the first part in your
Next subtract the number before
the decimal (in this case 7) by 16. (7 - 16 = 0.6875)
Now multiply 0.6875 by 16.
(0.6875 x 16 = 11) We see in the table that 11 = B.
Therefore B is the second part of your hex code.
You now have the first part of the hex value. 7 being the
first one and B being the second one. (7B)
Contine the same formula for the blue value
and the green value. If you started out with this number:
Red = 123 Blue = 235 Green = 63 the hexidecimal code for those values will
Is your mind mush yet? No? Ok, how about some more then. Since
we've covered how to make a hex value out of a r/b/g value, how
about we cover making a r/b/g value out of a hex value. One way
this comes in handy is when you see a color on a website shown in
hex code and you would like to use that color in Paint Shop Pro, or
another painting program.
We will be using the hex code "#7beb3f" as our example. Our first
step will be to take it apart the way it was put together, in two's.
The first number in our code is 7, we will multiply this number by 16
(7 x 16 = 112).
The next piece of the code is the letter B, since we can see
on the chart that B = 11 we will be using
11 as our next number.
Add 11 to the 112 we found the first
part of the red value to be (11 + 112 = 123)
This will result in the answer 123.
If you will remember, 123 was the red value we started out with.
Continue this same process with the other remaining numbers and/or
letters. When you have completed this formula you will end up with the
r/b/g values we used to make into a hex value.
Go to index.