Color codes

In HTML a color is cosntructed using a combination of three primary colors, namely, red, green and blue. Each of these three colors can take a value between 0 and 255 that represents its paticipation in the mixture of colors, being 255 its maximum participation and 0 its minimum.

Then, a color code used in HTML is composed by a hash sign ("#") followed by the intensity of the colors red, green and blue (in that order), written in hexadecimal notation. When a color in the scale that goes from 0 to 255 is written in hexadecimal notation, you get, always, a two digits value between "00" and "ff". Therefore, a color code always is seven characters long.

In this scheme, the color code for the deepest red requires having the value "ff" for the red part and "00" for the rest, which returns "#ff0000". Likewise, the color code for green is "#00ff00" and for blue "#0000ff". When these three values are mixed you get the same results as in a palette, so that yellow can be created mixing red and green ("#ffff00"), violet mixing red and blue ("#ff00ff") and cyan mixing green and blue ("#00ffff").

The tone can also be altered, incresing or decreasing all three values proportionally. For example, the violet color shown above ("#ff66ff") can be cleared up ("#ff66ff") or darkened ("#aa00aa").

Color chart

Because of the nature of this section, blind people may find the following color chart barely useful.

This color chart shows a wide range of colors that can be used in HTML documents. If you click over the charts, the color and its code will be displayed in the "Current" panel. The extra functionality allows users to preview a color pick in the example document below, by selecting one of its elements and next a color from the chart.

Selecting: #ffffff
Current: #ffffff

HTML colors #222222

Tones #eeeeee

The tone of colors can be changed increasing or decreasing the three values proportionally. #eeeeee

#888888

HTML colors are constructed using a combination of three primary colors: red, green and blue. Each one of these colors can take a value from 0 to 255 and are represented in hexadecimal notation (00 to ff). This being said, a color is composed by six characters where the two first represent the red value, the two second represent the green value and the two third represent the blue value. For example, the pure-red color gets "ff" for the red and "00" for the rest: "ff0000"). Then, a color code used in HTML is built by a hash sign ("#") followed by the intensity of the colors red, green and blue (in that order), written in hexadecimal notation. #222222

#dddddd