Project Management

Is the Web-safe palette still valid?

The Web-safe color palette contains the colors that are supposed to render consistently across platforms and browsers. Find out if this palette is best for you.

This article originally appeared as a Design and Usability Tactics e-newsletter.

By Michael Meadhra

The Web-safe color palette contains the colors that are supposed to render consistently across platforms and browsers. But is this venerable tool an anachronism—a relic from a bygone age that is no longer relevant in a time when most computers are capable of displaying thousands or even millions of colors?

Where did the Web-safe palette come from?

The Web-safe palette dates from the early days of the Web when most computers could display only 256 colors. In contrast, Web color codes specify 256 levels each of red, green, and blue, producing 16.7 million possible colors. To reconcile the difference, browsers must shift any color that doesn't match one of the available display colors to the nearest 256-color equivalent or use dithering to simulate the specified color.

Dithering and shifting colors are, of course, highly undesirable characteristics for Web objects. The color shifts are often unpredictable and may even cause objects to disappear if the foreground and background shift to the same color; hence the need to identify colors that don't exhibit those problems on a 256-color display.

Netscape and Internet Explorer share 216 such colors, which became known as the Web-safe color palette. The 216 colors are the result of arranging RGB values in a 6x6x6 matrix, with black, white, and the primaries on the corners and colors changing in 20-percent increments. (Reserved system colors for Mac and Windows account for the other 40 colors.)

Problems with the palette

The Web-safe palette isn't ideal. Although the color increments are mathematically precise, it contains numerous colors that are visually close to being duplicates, while some color gradations seem to be missing steps. The palette is also short on pastels, neutrals, and earth tones. As a result, designers often can't find the colors they want in the Web-safe palette, and converting the desired colors to the nearest Web-safe match may not produce satisfactory results.

Modern graphics cards and monitors are no longer restricted to displaying 256 colors. In fact, almost all recent computers can display thousands of colors (High Color) or millions of colors (True Color). Statistics at show only 3 percent of site visitors use 256-color displays, compared to 40 percent for High Color and 55 percent for True Color.

High Color (16-bit) displays can't reproduce all the colors defined by Web color codes. Browsers deal with this by mapping the color of each object to its closest High Color equivalent. There's a lot of color shifting going on, but with thousands of colors to work with, the color shifts are generally very subtle. High Color displays present their own problems to Web builders, but the Web-safe palette doesn't address those problems directly.

True Color (24-bit and 32-bit) displays can show all 16.7 million colors that you can define with Web color codes. So there are no dithering or arbitrary color shift problems when viewing a Web page on a computer with a True Color display.

So why use it?

With the 256-color display for which it was designed gradually disappearing, has the Web-safe palette outlived its usefulness to Web builders? Surprisingly, I think not.

First, even the small percentage of Web visitors using 256-color displays can translate to a significant number of real page views at a popular site. When the site goals include being accessible to the largest possible audience, the Web-safe palette is a valuable tool for providing display-challenged visitors with a predictable Web experience.

Perhaps a more important consideration is that the High Color and True Color palettes are just too large to work with effectively as you design a site. Designers need to carefully test and become familiar with a smaller subset of the available colors so they can predict how those colors appear on different monitors and platforms. For now, the Web-safe palette fills that need for most designers. Although some may supplement it with their client's corporate colors and other favorite shades, the Web-safe palette serves as a common foundation for all Web builders.

Another palette that addresses some of its aesthetic deficiencies will probably replace the Web-safe palette. Until then, the Web-safe palette provides the traditional starting point for most Web color schemes.

Michael Meadhra has been working in the IT field since the earliest days of the Web. His book credits span some three dozen titles, including How to Do Everything with Dreamweaver MX.

Editor's Picks

Free Newsletters, In your Inbox