Oct 10, 2011
admin
Comments Off

Web Safe Colors in HTML

The colors used in designing web pages are known as web colors. To represent colors in HTML related documents, a six digit hexadecimal (3 bytes) number is used. This 3 byte number is called hex triplet and has the components of red, green and blue colors. The 3 bytes in this hex triplet come in the following order:

Byte 1: red value. Byte 2: green value Byte 3: blue value

Websafe colors are the 216 standard colors, which are used to design or display text or images on any web page of any browser on any computer without dithering on 256 color displays. Dithering used to happen on 256 color displays if a particular color is not available.

The replacement was 216 color palettes. The reason for choosing 216 color systems was because operating systems reserved 40 colors for their own use. Also the number 216 (6*6*6) allows exactly 6 equally spaced shades of red, green and blue. The hexadecimal range is from 00 to FF. Now you use a Windows browser or a Macintosh browser, you will get the same display colors. This property makes them a safe option.

There are 6 different RGB values, which define Websafe colors. These values are 0, 51, 102, 153, 204, and 255. Actually there is an interesting correlation among these numbers- 51 is 20% of 255, 102 is 40% of 255 and so on.

One can use these safe colors for various uses in HTML documents such as solid colored background to make clean non-dithered background, graphics with invisible backgrounds, image with invisible background etc.

 

Comments are closed.