Web-safe Colors
Color depth |
---|
1-bit monochrome |
Related
Indexed color |
At one time many computer displays were only capable of displaying 256 colors. These may be dictated by the hardware or changeable by a "color table". When a color is found (e.g., in an image) that is not one available, a different one has to be used. This can be either using the closest color, which greatly speeds up the load time, or it can use dithering, which looks a great deal better, but it takes a while to load due to the complex calculations involved.
There were various attempts to make a "standard" color palette. A set of colors was needed that could be shown without dithering on 256-color displays; the number 216 was chosen partly because computer operating systems customarily reserved sixteen to twenty colors for their own use; it was also selected because it allows exactly six equally-spaced shades of red, green, and blue (6 × 6 × 6 = 216), each from 00 to FF (including both limits).
The list of colors is often presented as if it has special properties that render them immune to dithering. In fact, on 256-color displays applications can set a palette of any selection of colors that they choose, dithering the rest. These colors were chosen specifically because they matched the palettes selected by the then leading browser applications. Fortunately, there were not radically different palettes in use in different popular browsers.
"Web-safe" colors had a flaw in that, on systems such as X11 where the palette is shared between applications, smaller color cubes (5×5×5 or 4×4×4) were often allocated by browsers—thus, the "web safe" colors would actually dither on such systems. Better results were obtained by providing an image with a larger range of colors and allowing the browser to quantize the color space if needed, rather than suffer the quality loss of a double quantization.
As of 2011, personal computers typically have 24-bit (TrueColor) and the use of "web-safe" colors has fallen into practical disuse. Even mobile devices have at least 16-bit color, driven by the inclusion of cameras on cellphones.
The "web-safe" colors do not all have standard names, but each can be specified by an RGB triplet: each component (red, green, and blue) takes one of the six values from the following table (out of the 256 possible values available for each component in full 24-bit color).
Key | Hex | Decimal | Fraction |
---|---|---|---|
0 | 00 | 0 | 0 |
3 | 33 | 51 | 0.2 |
6 | 66 | 102 | 0.4 |
9 | 99 | 153 | 0.6 |
C or (12) | CC | 204 | 0.8 |
F or (15) | FF | 255 | 1 |
The following table shows all of the "web-safe" colors, underlining the really-safe colors. (One shortcoming of the web-safe palette is its poor selection of light background colors.) The intensities at the low end of the range, especially the two darkest, are often hard to distinguish.
Read more about this topic: Web Colors
Famous quotes containing the word colors:
“Then, bringing me the joy we feel when wee see a work by our favorite painter which differs from any other that we know, or if we are led before a painting of which we have until then only seen a pencil sketch, if a musical piece heard only on the piano appears before us clothed in the colors of the orchestra, my grandfather called me the [hawthorn] hedge at Tansonville, saying, You who are so fond of hawthorns, look at this pink thorn, isnt it lovely?”
—Marcel Proust (18711922)