Colors are one of the ways used to create visual and aesthetic appeal in web design. It therefore comes as no surprise that HTML, the most popular web design language should support colors. In fact, use of HTML is one of the easiest ways of incorporating color in moderation on your site.
Generally, colors are displayed by the use of red, green and blue light. HTML colors are defined by the use of a hexadecimal code or notation which combines the red, green and blue (RGB) color values to give a total of 256 colors. The lowest values given to any one of the light source is 0 which translates into 00 in hexadecimal codes while the highest is 255 which translates to FF in hexadecimal codes. The hexadecimal code is usually a code of three pairs of two digit numbers, each digit pair representing the RGB (Red Green Blue) quantity of the color. The code is preceded by the # symbol. A good example is color black which does not have any RGB content and hence its RGB values are (0, 0, 0). The hexadecimal code will in turn be #000000. For color red, the RGB values will be (255, 0, 0) and the hexadecimal code #FF0000, color green RGB (0, 255, 0) and hexadecimal code #00FF00, and color blue RGB (0, 0, 255) and hexadecimal code #0000FF. Other colors are defined by the respective quantity of red, blue and green for example color purple which is a mixture of red and blue with no green content will have an RGB content of (255, 0, 255) and the hexadecimal code will be #FF00FF.
Due to the fact that the combination or concentration of the red blue and green content in each color can vary from 0 to 255, 16 million colors can thus result from the hexadecimal code as in (256 x 256 x 256). Gray color is a mixture of red blue and green in equal quantities. To create different shades of gray, you use the three colors in equal quantities but varying concentrations. For example RGB content of (8, 8, 8) will create a very dull gray color while high concentration such as RGB of (64, 64, 64) will create a much lighter gray.
Years back when the computer’s resolution was limited to 256 colors, a list of 216 colors had been created as labeled web safe colors which if one used, would appear undistorted in any computer. Modern day computers however have higher resolutions and the idea of web safe colors seems to have faded away.
There are 147 color names defined by HTML system of colors. 17 of these colors are standard while the rest are additional colors. The standard colors are aqua, teal, fuchsia, black, gray, maroon, grey, lime, white, navy, green, silver olive, purple, red, blue, and yellow and the rest 130 colors are different shades of this colors. All the colors are defined in the hexadecimal codes and their codes vary depending on the content of red blue and green colors.