Where the 216-color palette came from
In the mid-1990s, a large share of computer displays could only show 256 distinct colors at once, because their video hardware allocated just 8 bits per pixel — one byte, indexed into a 256-entry color lookup table, rather than a direct 24-bit RGB value per pixel. Windows and classic Mac OS each reserved a portion of that 256-slot table for system colors (window chrome, cursors, dialog elements), leaving roughly 216 slots that a web page could reliably expect to render without the browser having to approximate a requested color through dithering. The web-safe palette is exactly that reliable subset: 216 specific colors chosen so they'd render identically, slot for slot, on both major indexed-color systems of the time.
Why 216 and not some other number
The palette isn't 216 arbitrary colors — it's every combination of six specific values (00, 33, 66, 99, CC, FF) across each of the three RGB channels, evenly spaced from 0 to 255 in steps of roughly 51. Six choices per channel, three channels, gives 63 = 216 total combinations — a systematic grid through color space rather than a curated or perceptually-adjusted set. That systematic structure is also why every web-safe hex code has a recognizable pattern: each pair of hex digits is always one of exactly six values, never anything in between.
Why this constraint mostly disappeared
By the early 2000s, 24-bit ("true color") displays capable of showing all 16.7 million RGB combinations directly had become standard, and indexed 256-color display hardware was obsolete. Once a screen can render any hex value exactly, there's no rendering benefit to restricting a design to the 216-color subset — the entire premise of the palette, avoiding dithering on limited hardware, no longer applies to virtually any device in current use. The palette survives today mainly as a design constraint chosen deliberately for its look — a flatter, more limited-feeling aesthetic that reads as deliberately retro — rather than as a technical requirement.
How each hex code is built
Every web-safe color follows the same construction: pick one of the six levels for red, one for green, one for blue, and concatenate them. #3399CC, for instance, pairs the second level (33) for red, the fourth (99) for green, and the fifth (CC) for blue. Because every channel value in the set happens to use the same digit twice (00, 33, 66, 99, CC,FF), every web-safe color also has a valid 3-digit CSS shorthand — #3399CCcan equally be written #39C — which is a quick way to spot whether an arbitrary hex color happens to already be web-safe.
Using this table in practice
Each swatch above shows its own hex code and copies it to the clipboard on click, which is the fastest way to pull an exact web-safe value into a stylesheet or design tool. For a themed set — say, picking a handful of these colors as a brand or UI palette and needing to double-check their RGB, HSL, or CMYK equivalents, or hand a printable reference sheet to someone else — the Hex ↔ RGB converter and thepalette PDF export both accept any of these hex codes directly.
Web-safe colors versus a modern design system palette
It's worth being clear that "web-safe" and a curated design-system palette (like Tailwind CSS's default colors) solve entirely different problems and were built decades apart, for different reasons. The web-safe set is a mechanical grid through RGB space, built for hardware compatibility; a modern palette like Tailwind's is hand-tuned for visual consistency and accessible contrast across many shades of each hue. A color can belong to the web-safe set without looking especially good next to its neighbors, and a well-designed modern palette only rarely lands exactly on a web-safe value by coincidence.