Codes to define Colours
When I published today my post "Random Colour - colour palette for your website", a member asked me what hex codes are. This was the starting point for this blog about coding of colours.
As you probably know the colours of a computer screen are RGB colours: R= Red, G=Green and B=blue. RGB is an additive colour model in which the red, green and blue light are added together to give use a broad array of colours. Each of the three basic colours has a range of 256 shades (0-255), so that we can have a total of 256 x 256 x 256 = 16,777,216 possible colours.
In HTML and CSS coding you can define a colour in different manners:
17 colours by their names in HTML and 140 colours in CSS.
The 17 standard colours are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow.
All the colours can be defined RGB values:
Black = 0,0,0 (R0,G0,B0)
White = 255, 255, 255 (R255,G255;B255)
Red = 255,0,0
Green = 0,255,0
Blue = 0,0,255 and so on
You can also define the colours in the hexadecimal, also base 16, or hex codes: 16 being the square root of 256. The 16 normally used signs are the numbers from 0 to 9 and the six first letters from the ABC (A, B, C, D, E, F) representing the numbers from ten to fifteen. Today the hexadecimal colour code is the most used in webdesign.
To explain the simplest way is to compare the 17 standard colours by name, by rgb values and by hex values
Aqua 0,255,255 #00FFFF (Cyan)
Black 0,0,0 #000000
Blue 0,0,255 #0000FF
Fuchsia 255,0,255 #FF00FF (Magenta)
Gray 128,128,128 #808080
Green 0,128,0 #008000
Lime 0,255,0 #00FF00 (RGB green)
Maroon 128,00,00 #800000
Navy 0,0,128 #0000FF
Olive 128,128,0 #808000
Orange 255,165,0 #FFA500
Purple 128,0,128 #800080
Red 255,0,0 #FF0000
Silver 192,192,192 #C0C0C0
Teal 128,128,0 #008080
White 255,255,255 #FFFFFF
Yellow 255,255,0 #FFFF00
There are a lot of colour picker tools and information about how to define and find colours.
These are my favourites:
http://www.w3schools.com/html/html_colorvalues.asp
http://www.w3schools.com/tags/ref_colorpicker.asp
http://web.forret.com/tools/color.asp
Recent Comments
6
Thanks for the detail Explanation of Hexadecimal , RGB code. It is a great helpful blog for WAyers.
Thank you Giludi.
A while ago, I designed some t-shirts on an online t-shirt design site. Wanting to also replicate my designs on other t-shirt design sites, I took a note of the hex codes, not really knowing what they were, but guessing that they must be important. I now know why!
Many thanks,
All the best,
Brandon
Thanks, Guy! Now I know what you were talking about. I've seen those numbers with reference to colors, but never knew what they were.
Impressive coming from a guy......most men know red, blue, green, yellow, black and brown. You actually know the words teal and magenta and lime, etc. ~Debbi