Colors Web-Safe Colors
The 216-color 'web-safe' palette was designed in the 1990s for displays that could show only 256 colors at once, and it is now an obsolete historical curiosity rather than practical color advice.
Where the web-safe palette came from
In the mid-1990s, many computer monitors and graphics cards could display only 256 colors on screen at one time, an 8-bit color depth. Windows and Mac OS each reserved a different handful of those 256 slots for their own system use, leaving a common subset that both platforms could render identically without unpredictable dithering or color shifts. Designers of the era called that shared subset the "web-safe" palette.
The palette works out to exactly 216 colors because each of the red, green, and blue channels was restricted to just six possible values: 00, 33, 66, 99, CC, and FF in hex, which is 0, 51, 102, 153, 204, and 255 in decimal. Combining six choices for each of three channels gives 6 x 6 x 6 = 216 usable colors.
A web-safe hex value
<!DOCTYPE html>
<html>
<head>
<style>
.banner {
background-color: #6699CC; /* rgb(102, 153, 204) - a web-safe combination */
color: #003366; /* rgb(0, 51, 102) - also web-safe */
}
</style>
</head>
<body>
<div class="banner">Web-Safe Banner</div>
</body>
</html>Why it stopped mattering
8-bit, 256-color displays were already fading by the early 2000s as graphics hardware and operating systems moved to 24-bit "true color," which supports about 16.7 million colors, every combination of 256 values per channel. Once that became standard on essentially all monitors, phones, and tablets, the problem the web-safe palette was designed to avoid, colors dithering or shifting unpredictably between machines, stopped being a real concern for the overwhelming majority of visitors.
- Virtually every modern screen, from phones to 4K monitors, renders full 24-bit color
- Operating systems no longer reserve palette slots the way 1990s Windows and Mac did
- Browsers apply hex, rgb(), and hsl() colors exactly as specified, with no palette substitution
- Retina and high-DPI displays make the old 216-color limitation feel especially crude today
Should you ever choose from that palette on purpose?
There is no accessibility, performance, or compatibility reason to restrict yourself to the 216-color set today. The only time it comes up on purpose is stylistic: a project deliberately chasing a retro, early-web aesthetic might borrow web-safe hues for authenticity, the same way a game might choose a limited retro palette on purpose. For everyday design, pick colors freely with hex, rgb(), or hsl(), and let the full millions-of-colors range work for you.
Named keywords such as tomato or rebeccapurple are unrelated to this palette; see Named Colors for how those work instead.
Exercise: Colors Named
What exactly is a CSS 'named color', such as tomato or steelblue?