Web Safe Colors
The classic 216-color palette from the era of 256-color displays. Click any swatch to copy its hex code.
How to use the web-safe color chart
- Scan the grid of all 216 colors. Every value is built only from the channel values 00, 33, 66, 99, CC and FF.
- Click any swatch to put its code on your clipboard.
- Paste it into CSS, a pixel-art editor or a palette file.
- To see the same set next to other curated collections, open the color library, where the Web-safe 216 is one of the palettes.
Where the 216 colors came from
In the mid-1990s, many computers ran 8-bit displays that could show only 256 colors at once. When a page asked for a color outside the browser's fixed palette, the browser dithered it into a pattern of dots. A 216-color set fit inside those 256 slots with room to spare for system colors, and rendered as solid color across the common browsers and platforms of the time.
Why 216? It is 6 × 6 × 6, the largest cube with an equal number of levels per channel that fits in 256. Seven levels would need 343 slots.
The 6×6×6 color cube
Each channel takes one of six evenly spaced values: 0, 51, 102, 153, 204 and 255, written in hex as 00, 33, 66, 99, CC and FF. The steps are 20% apart, so #FF6600, or rgb(255, 102, 0), is 100% red, 40% green and 0% blue.
Because each channel repeats a single digit, every web-safe color has a 3-digit shorthand: #FF6600 is #F60 and #336699 is #369. That also gives you a quick test: if any pair in a six-digit code is not 00, 33, 66, 99, CC or FF, the color is not web-safe.
Do web-safe colors still matter?
No. Current displays show at least 24-bit color, or 16,777,216 values, so any hex code renders as intended and a 216-color limit buys no compatibility. The coarse 20% steps also leave few usable mid-tones for interface work. Among the web-safe grays, #666666 on white is 5.74:1 and passes WCAG AA for text, but the next step, #999999, is 2.84:1 and fails. Check any pairing you plan to use in the contrast checker.
Good reasons to use them today
- Retro and pixel-art styling that nods to 1990s web pages and early PC graphics.
- A fixed, limited palette for game jams, generative art or teaching, where 216 set choices make decisions faster and keep work consistent.
- Memorable shorthand in prototypes, since codes like
#F60and#369are quick to type and easy to recall.
Frequently asked questions
How many web-safe colors are there?
There are 216. Each of red, green and blue uses one of six values, 00, 33, 66, 99, CC or FF, and 6 × 6 × 6 is 216.
Are web-safe colors still necessary?
No. They were designed for the 256-color displays of the 1990s. Modern screens show millions of colors, so any hex code displays correctly.
How can I tell if a hex color is web-safe?
Check that every pair is 00, 33, 66, 99, CC or FF. #336699 is web-safe; #336698 is not, because 98 is not one of the six levels.
Why are there 216 web-safe colors and not 256?
With six levels per channel, 6 × 6 × 6 is 216, the largest even cube that fits in a 256-color palette; seven levels would need 343. The leftover slots stayed available for system colors.
Can I use web-safe colors for pixel art?
Yes. The fixed 216-color cube gives a consistent, slightly retro palette, and every color can be written as 3-digit hex such as #F60 or #369.