How to use HTML Color Codes?
With HTML color codes you can set the color of web site background, color of text, cells in tables and much more.
Using HTML color codes for web site background color:
<body style="background:#80BFFF"> |
Using HTML color codes for setting font/text 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"> |
HTML Color Codes Theory
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:)
HTML Codes format:
Each HTML code contains symbol "#" and 6 letters or numbers. These numbers are in hexadecimal numeral system. For example "FF" in hexadecimal represents number 255 in Decimal.
Meaning of symbols:
The first two symbols in HTML color code represents the intensity of red color. 00 is the least and FF is the most intense. The third and fourth represents intensity of green and fifth and sixth represents the intensity of blue. So with combining the intensity of red, green and blue we can mix almost any color that our heart desire;)
Examples:
#FF0000 - With this HTML code we tell browser to show maximum of red and no green and no blue. The result is of course pure red color:
#00FF00 - This HTML code shows just green and no red and blue. The result is:
#0000FF - This HTML code shows just blue and no red and green. The result is:
#FFFF00 - Combination of red and green color gives us yellow:
#CCEEFF - Take some red a bit more of green and maximum of blue to get color of sky:
Tidak ada komentar:
Posting Komentar