Websafe colors
Websafe colors are a relic of 1990s web design. If you've been building websites long enough, you probably remember the heated debates about whether to restrict your palette to just 216 colors. If you haven't — this page exists purely for historical curiosity. You can safely ignore websafe colors in any modern project.
What were websafe colors?
In the early days of the web, many computer monitors had 8-bit color displays — meaning they could show a maximum of 256 colors at once. The operating system reserved roughly 40 of those for its own interface (menus, window frames, scrollbars), leaving just 216 colors available for everything else on screen, including web pages.
Those 216 colors weren't chosen by designers. They were generated mathematically by combining six evenly spaced values — 0%, 20%, 40%, 60%, 80%, and 100% — across the red, green, and blue channels. That's 6 × 6 × 6 = 216 combinations. In hex, those six values translate to 00, 33, 66, 99, CC, and FF.
The result was a palette that covered the gamut uniformly but paid no attention to aesthetics. You got plenty of saturated primaries and garish combinations, but very few of the subtle, desaturated tones that most design work actually needs.
Why they were important
On an 8-bit display, any color outside the websafe palette would be dithered — the browser would approximate it by mixing dots of two nearby websafe colors in a checkerboard pattern. This was visually noticeable and often ugly, especially on flat-colored backgrounds and text.
The problem extended beyond CSS. If you used a specific hex color for a page background in your HTML and then created a header graphic in Photoshop or Fireworks using that same color, both had to be websafe values — otherwise the flat HTML background and the graphic's background would dither differently, producing a visible seam where the image met the page. Designers spent real time ensuring every color in every graphic matched the websafe palette exactly, or they'd get mismatched edges that betrayed the illusion of a seamless layout.
This constraint shaped an entire era of web design. Tutorials, books, and tools were built around websafe color pickers. Choosing colors for a website meant starting with 216 options and working within those limits.
The 216 websafe colors
Do you need to use websafe colors today?
No. 8-bit displays are essentially extinct. Every modern screen — phones, tablets, laptops, monitors — supports at least 24-bit color (16.7 million colors), and many now support wide gamut displays with even more.
A page using any color outside the websafe palette renders perfectly on every device made in the last twenty years. The websafe palette is a historical artifact — interesting to know about, but irrelevant to any design decision you'll make today.