Where can I find a list of the colours that can be used in html?

kitkat

New member
I'm trying to teach myself html, and I am currently learning about changing the colour of backgrounds and text. As you have to type out the name of the colour, is there somewhere I can find a list of all the colours names which can be used?

also, is there any way to choose whatever colour you like, using the RGB values?

thank you :)
 
You can specify a colour using Hexadecimal values like this: color="RRGGBB" where RR is a double digit Red value, GG is a double digit Green value and BB is a double digit blue value.

A few examples:
color="#FF0000" is Red
color="#FFFF00" is Yellow (Red and green mixed)
color="#00FF00" is Green
color="#00FFFF" is Aqua (Green and blue mixed)
color="#0000FF" is Blue
color="#FF00FF" is Purple (Red and blue mixed)
color="#FFFFFF"is White
color="#000000" is Black

The values range from 0123456789ABCDEF (where A-F is 10-15 basically single characters to represent the double digits also known as 'Hexadecimal'. You can only use these characters, not case sensitive.

If the first two digits are exactly the same as the middle two and the last two digits or in other words if RR=GG=BB for example:
color="#333333"
color="#505050"
color="#777777"
color="#DEDEDE"
then the colour will be a grey colour.
The higher the values the brighter the colours so #FF0000 is bright red where as #990000 is a darker red.

Here is a HTML example for you.

<div color="FF9900">This text will be orange</div>
<div color="333333">This text will be a dark grey</div>

Just remember the principle of RRGGBB and you should be ok

I am also teaching myself however I started over a year ago now. Its so much fun when you hit javascript stage.

Please email me if i have been helpful. I would like to maybe make a site that helps teach these different aspects.

I know that if you type in your question in to google and add w3schools with it for example:
html color w3schools
there you will find lots of useful information on how to do things. Theres also loads of examples
 
Back
Top