My Photo
Name: Nhoel

Powered by Blogger

Subscribe to
Posts [Atom]

MOST VISITED:
www.KeywordSpeak.com
How-to tutorials, Computer utilities and more...


Table Of Contents

Sunday, October 19, 2008

HTML Colors



In html, it is very important to understand how colors are being treated or interpreted. The persons who standardize the html decided to use hexadecimal formatted colors for the browsers.

Don't panic, you do not need to memorize all those hexadecimal codes for each colors. The internet is so old that many website offer those hexed color codes in free. What important for now is for you to know that colors on the web are in hexadecimal format.

It's important to understand this format so you can play with it too, so let's begin:

This is an example of a hexadecimal formatted web color: #ffffff

Generally, a number (or sharp) sign is placed before the hex code.

Now, this hexadecimal color format is arrange based on the combination of the RGB colors: Red, Green and Blue.

Each colors takes two position on the hex-code, which will be #RRBBGG.

Also, you must learn that the heaxadecimal is written in this way:

0 1 2 3 4 5 6 7 8 9 a b c d e f

Hex color is based on 16, The colors will be adjusted to add as the count goes to the "f" value, and the colors will reduced when the count goes to zero.

It is much easier to remember this if you will recall what our elementary teacher said that the white color is the presence of all color, and black is the absence of all color.

With this, then the color white's hex code will be: #ffffff , or the rpesence of all color, and the black will be: #000000, or the absence of all colors.

Also, we can pull the green with this code: #00ff00 , since we turned-off all colors and except the green.

Red then will be: #ff0000
And blue will be: #0000ff


A combination of these three will give you different colors:

Yellow: #ffff00
Gold: #ffd700
Violet: #ee82ee


The Websafe Colors

If you have read other webmasters on other sites telling you about websafe colors, and advice you to stick on it, well, it is actually true. But I did not say that you should follow them, because the new generation of browsers today are so advance that they can interpret or decode any possible color combinations on the web.

But let's talk about the websafe colors so you may be informed. The websafe colors are colors with the strick combinations of 0,3,6,9,c & f characters. This is the proper format of hexadecimal color numbers. But as I have said, the advancement of browsers (Internet Explorer, Firefox, Chrome, etc.) can cater the most ambiguous color combination of an hex formatted web colors.

With this advance feature of the browsers, the websafe terms is now converted to a worry-free and coder-safe mentality.

What a relief, isn't it? Because im sure that no one wants an unexpected output for their website.

Now here's some useful web colors and their corresponding hex code:


HTML name Hex code
R   G   B
Red colors
IndianRed CD 5C 5C
LightCoral F0 80 80
Salmon FA 80 72
DarkSalmon E9 96 7A
LightSalmon FF A0 7A
Crimson DC 14 3C
Red FF 00 00
FireBrick B2 22 22
DarkRed 8B 00 00
Pink colors
Pink FF C0 CB
LightPink FF B6 C1
HotPink FF 69 B4
DeepPink FF 14 93
MediumVioletRed C7 15 85
PaleVioletRed DB 70 93
Orange colors
LightSalmon FF A0 7A
Coral FF 7F 50
Tomato FF 63 47
OrangeRed FF 45 00
DarkOrange FF 8C 00
Orange FF A5 00
Yellow colors
Gold FF D7 00
Yellow FF FF 00
LightYellow FF FF E0
LemonChiffon FF FA CD
LightGoldenrodYellow FA FA D2
PapayaWhip FF EF D5
Moccasin FF E4 B5
PeachPuff FF DA B9
PaleGoldenrod EE E8 AA
Khaki F0 E6 8C
DarkKhaki BD B7 6B
Purple colors
Lavender E6 E6 FA
Thistle D8 BF D8
Plum DD A0 DD
Violet EE 82 EE
Orchid DA 70 D6
Fuchsia FF 00 FF
Magenta FF 00 FF
MediumOrchid BA 55 D3
MediumPurple 93 70 DB
BlueViolet 8A 2B E2
DarkViolet 94 00 D3
DarkOrchid 99 32 CC
DarkMagenta 8B 00 8B
Purple 80 00 80
Indigo 4B 00 82
SlateBlue 6A 5A CD
DarkSlateBlue 48 3D 8B
MediumSlateBlue 7B 68 EE
HTML name Hex code
R   G   B
Green colors
GreenYellow AD FF 2F
Chartreuse 7F FF 00
LawnGreen 7C FC 00
Lime 00 FF 00
LimeGreen 32 CD 32
PaleGreen 98 FB 98
LightGreen 90 EE 90
MediumSpringGreen 00 FA 9A
SpringGreen 00 FF 7F
MediumSeaGreen 3C B3 71
SeaGreen 2E 8B 57
ForestGreen 22 8B 22
Green 00 80 00
DarkGreen 00 64 00
YellowGreen 9A CD 32
OliveDrab 6B 8E 23
Olive 80 80 00
DarkOliveGreen 55 6B 2F
MediumAquamarine 66 CD AA
DarkSeaGreen 8F BC 8F
LightSeaGreen 20 B2 AA
DarkCyan 00 8B 8B
Teal 00 80 80
Blue colors
Aqua 00 FF FF
Cyan 00 FF FF
LightCyan E0 FF FF
PaleTurquoise AF EE EE
Aquamarine 7F FF D4
Turquoise 40 E0 D0
MediumTurquoise 48 D1 CC
DarkTurquoise 00 CE D1
CadetBlue 5F 9E A0
SteelBlue 46 82 B4
LightSteelBlue B0 C4 DE
PowderBlue B0 E0 E6
LightBlue AD D8 E6
SkyBlue 87 CE EB
LightSkyBlue 87 CE FA
DeepSkyBlue 00 BF FF
DodgerBlue 1E 90 FF
CornflowerBlue 64 95 ED
MediumSlateBlue 7B 68 EE
RoyalBlue 41 69 E1
Blue 00 00 FF
MediumBlue 00 00 CD
DarkBlue 00 00 8B
Navy 00 00 80
MidnightBlue 19 19 70
HTML name Hex code
R   G   B
Brown colors
Cornsilk FF F8 DC
BlanchedAlmond FF EB CD
Bisque FF E4 C4
NavajoWhite FF DE AD
Wheat F5 DE B3
BurlyWood DE B8 87
Tan D2 B4 8C
RosyBrown BC 8F 8F
SandyBrown F4 A4 60
Goldenrod DA A5 20
DarkGoldenrod B8 86 0B
Peru CD 85 3F
Chocolate D2 69 1E
SaddleBrown 8B 45 13
Sienna A0 52 2D
Brown A5 2A 2A
Maroon 80 00 00
White colors
White FF FF FF
Snow FF FA FA
Honeydew F0 FF F0
MintCream F5 FF FA
Azure F0 FF FF
AliceBlue F0 F8 FF
GhostWhite F8 F8 FF
WhiteSmoke F5 F5 F5
Seashell FF F5 EE
Beige F5 F5 DC
OldLace FD F5 E6
FloralWhite FF FA F0
Ivory FF FF F0
AntiqueWhite FA EB D7
Linen FA F0 E6
LavenderBlush FF F0 F5
MistyRose FF E4 E1
Grey colors
Gainsboro DC DC DC
LightGrey D3 D3 D3
Silver C0 C0 C0
DarkGray A9 A9 A9
Gray 80 80 80
DimGray 69 69 69
LightSlateGray 77 88 99
SlateGray 70 80 90
DarkSlateGray 2F 4F 4F
Black 00 00 00


color's table source: Wikipedia

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home