Support

Home About Us Press Services Links Support Download Notice Boards
Colours

Colours, not the easiest thing to control unless you live in a hexadecimal world. Hex-a-what. Well, we are use to counting in base ten, because that's how many fingers we have. The designers of the original HTML decided to work in base sixteen because it all made sense to them (not because they had sixteen fingers). Without sounding too much like a math's lesson, the colours in HTML are made up of 256 shades of Red, Green and Blue. This can make up a possible total of 16,777,216 different colours. Until a version of HTML comes out that you can type in colours like 'green' you are going to have to stick with "#00ff00"

Lets take a look at the "#******".

To start with, we can split up the statement like so:

# First ** Second ** Last **
Tells the browser to expect a the number from within the HTML document. The Red component. A number between 0 and 256. The Green component. A number between 0 and 256. The Blue component. A number between 0 and 256.

Ok, but how do we put the number 256 into two characters?

You need to translate the number to hexadecimal. To count from zero to sixteen in hexadecimal you need to use some letters as well like so:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Base 10
0 1 2 3 4 5 6 7 8 9 A B C D E F Base 16

So 0 looks like 00 and 256 look like FF. I'have put some common colour in the table below.

Black - black is you can read it "#000000" - no red, green or blue
White "#FFFFFF" - full red, green and blue
Red "#FF0000" - full red, no green or blue
Green "#00FF00" - no red, full green and no blue
Blue "#0000ff" - no red or green but full blue

You can see that the green, in particular, is difficult to see on a white background. To make it darker we just lower the value of the green component

Dark Green "#006600" - no red, about 40% green and no blue

Other colours are made up of combining the different shades of the red, green an blue components.

Yellow "#FFFF00" - full red and green, no blue
Pink "#FF00FF" - full red, no green and full blue
Cyan - cyan "#00FFFF" - no red, full green and blue

Now you are totally confused, I will let you into a secret. Use a colour picker, they are much easier and it is a lot quicker than even looking up a chart. Search around the net for a dedicated program that works all the hexadecimal numbers out for you.
Previous... Back to support


Localdial.Com, St Georges Hall, St Georges Esplanade, St Peter Port, Guernsey GY1 2BJ
Tel (0) 1534 872872 Fax (0) 1481 724012 Email info@localdial.com

Terms and Conditions | Terms of Service | Privacy Policy | Anti Spam Policy |
©Copyright 2002 Localdial.Com. All rights reserved.