ARCHIVED: What are the 216 web browser-safe colors?
On 8-bit displays (used with older computers), which only have memory for 256 or fewer colors, browsers such as Internet Explorer use a palette of 216 colors that is the same across platforms. The remaining 40 colors are different in Mac OS X and Windows, so if you use colors outside of these 216, they may be dithered or substituted on some older computers.
You can visualize the layout for the color palette as a
three-dimensional grid, with its three axes corresponding to the
RGB primary colors of red, green, and blue. Browser-safe
colors are composed of any combination of the primaries in
only these saturations: 0%, 20%, 40%, 60%, 80%, and
100%. The hexadecimal equivalents of these saturations are
00, 33, 66, 99, CC, and FF, respectively. In decimal, they are 0, 51,
102, 153, 204, and 255, respectively. Therefore, in an HTML
tag with the BGCOLOR
attribute, #CC00CC
is
browser safe, while #DD15C3
is not.
Many graphics programs give you the option of using the browser-safe
palette for your images. In Mac OS X, the HTML Color Picker has this
option built in. To get to it, in the Colors
window,
click ; then, next to "List:", select
.
This is document afrp in the Knowledge Base.
Last modified on 2021-09-08 10:17:18.