How to use HTML COLOR CODES ??
Using HTML color codes we can set the color of web site background, color of cells in tables, color of text, color of table headers and much more.
Using HTML color codes for website background color:
<body style="background:#80BFFF"> |
Using HTML color codes for setting text color or font Color:
<span style="color:#80BFFF"> |
Using HTML color codes for table background color:
<table style="background:#80BFFF"> |
Using HTML color code for link color:
<a style="color:#80BFFF"> |
Definition of HTML Color Codes
HTML color Codes are defined using a hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given to one of the light sources is 0 (hex 00). The highest value is 255 (hex FF).
Hex values are written as 3 double digit numbers (000000), starting with a # sign. So you are wondering "Does this weird combination of letters and numbers have any meaning?" Well the answer is "Yes" and this is how it goes:)
| Color |
Color HEX |
Color RGB |
| |
#000000 |
rgb(0,0,0) |
| |
#FF0000 |
rgb(255,0,0) |
| |
#00FF00 |
rgb(0,255,0) |
| |
#0000FF |
rgb(0,0,255) |
| |
#FFFF00 |
rgb(255,255,0) |
| |
#00FFFF |
rgb(0,255,255) |
| |
#FF00FF |
rgb(255,0,255) |
| |
#C0C0C0 |
rgb(192,192,192) |
| |
#FFFFFF |
rgb(255,255,255) |
More than 16 Million Different Colors
We can generate more than 16 million different html color codes by combining Red, Green, and Blue values from 0 to 255 (256 x 256 x 256).
|