HEX Color Codes (HTML/CSS)

There are a variety of ways to color web sites. These hexadecimal codes can be used in both XHTML and CSS.Decimal color codes can be used in CSS and most graphics tools.

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;

#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.

#0000FF - This HTML code shows just blue and no red and green.

#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:

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to display a image through HTML?

  If you want to display a image through HTML, here is the guidance. We will guide you further...

HTML Page Redirection Code

Valued Customers,If you wish to redirect an HTML page to another page / website you can use the...