|
|
--oo00oo--
| Colour
Values |
Colour can be confusing to
people not trained in the ways of computers. This is for two reasons.
-
Colours are represented by Red, Green and Blue values.
-
They are represented in Hexadecimal numbering.
However, Netscape supports a large number of colour names, and IE
supports a few of these as well. But if you can use the hexadecimal values it
will make your page more compatible.
|
|
| Why
RED, GREEN & BLUE? |
Ok, this is an easy one, it
uses Red, Green & Blue because these are the primary colours of light. You
may have used an art package, or merely changed the colours in Windows, but
you've probably seen three sliders or boxes to control the amount of Red, Green
& Blue. You use these to control the shade of the colour. |
| Why
Hexadecimal? |
Usually you will find these
bars go up to 100, easy peasy. But that doesn't really give you very much
control does it? And besides that, how is Netscape going to know whether you
meant 100 Red, 1 Green and no Blue? Well, the simple answers is to force the
person coding the HTML to use only two digits for each colour, representing 1
as 01, and nothing as 00. But that only allows a maximum of 99. This
is where Hexadecimal comes in. It allows you to specify a value up to 255,
which is a good level, as most people have only 256 colour video drivers for
windows anyway (some have only 16, while others have 16.7 million!).
Hexadecimal is also used widely throughout computing, so it made
sense early on.
|
| So
how do I work out the values? |
Ok, here's a quick tip. Just
experiment till it looks right. Remember, each digit can be 0123456789ABCDEF.
You need two numbers per colour, giving a total of six numbers to represent
your colour. the first two are for the Red in the colour, the second for the
Green and the third for the blue. So to get just red I'd type
FF0000, to get Green
00FF00 and Blue 0000FF.
To get a darker red I might use AA0000,
or 550000 and so
on. White is FFFFFF, black is 000000. But hey, if you want
a quick result, think of the value in normal decimal terms, say 200. Load up
calculator and put it into scientific mode. Type in 200, then click on the Hex
button and it changes it to Hex!! You can do the reverse to find the value of a
Hex number.
|
| Fine,
but where can I use colours? |
You can use colours to change,
the background of your page, the colour of your text,
the colour of an un/visited/activated link, the colour of text and the colour
of the cells in Tables.
I'll go through changing the body colours here, and the rest in their
relevant sections.
The <BODY> tag can contain the following values for colour :
BGCOLOR
TEXT
LINK
VLINK
ALINK
BGCOLOR is the background colour of your page, your wallpaper.
Remember if you've set an image as the background, this colour will be behind
the picture, so the viewer can't see it. However, it's wise to specify a colour
opposite to your text anyway, in case the viewers turns off images. On this
page it's white.
TEXT is pretty obviously the colour of the text on the page. On this
page it's black.
LINK is the colour of links, these are the words you click on to take
you to another page, such as this one for the
resources page. It also controls the colour of the border your browser puts
around images that are clickable (unless the designer has specified no borders
to be shown). On this page it's dark blue.
VLINK is the colour for links that you have already visited, such as
this one for this page. On this page it's a kind of cyan.
ALINK is the colour of a link when you actually click on it, to let
you know you hit it properly. On this page it's red.
|
|