Web-safe colors
The 216 web-safe colors with their hex codes, grouped by red value. Click any swatch to copy it, or snap a color of your own to the nearest web-safe one.
All 216 web-safe colors
Each block fixes the red value. Rows step through green and columns through blue, both from 00 to FF. Click any swatch to copy its hex code.
Red 00 (0%)
Red 33 (20%)
Red 66 (40%)
Red 99 (60%)
Red CC (80%)
Red FF (100%)
Snap any color to the web-safe palette
Type a hex code and each channel moves to the nearest of the six values. The result can look quite different from what you typed.
What web-safe colors are
Web-safe colors are the 216 colors made from six equally spaced levels of red, green and blue. The levels in hex are 00, 33, 66, 99, CC and FF. The set was designed so a page could show its colors on 256-color displays without dithering.
| Hex | Decimal | Share of full intensity |
|---|---|---|
00 | 0 | 0% |
33 | 51 | 20% |
66 | 102 | 40% |
99 | 153 | 60% |
CC | 204 | 80% |
FF | 255 | 100% |
Are they still useful?
Almost no current screen needs them. The palette is useful today as a small, evenly spaced set of colors that are easy to write by hand, and as a record of how early web design worked. Its weakness is range: there are few light colors for backgrounds, and the two darkest levels in each channel are hard to tell apart.
Related pages
Frequently asked questions
How many web-safe colors are there?
216. Each of red, green and blue takes one of six values (00, 33, 66, 99, CC, FF), and 6 × 6 × 6 = 216.
Why 216 and not 256?
A 256-color display could only show 256 colors at once, and operating systems customarily reserved sixteen to twenty of them for their own use. Six equally spaced levels per channel gave 216, which fit in what was left.
Do I still need web-safe colors?
No. Through the 2000s, 256-color displays gave way to 24-bit displays, and web-safe colors are no longer commonly used. The palette is now mostly a historical reference and a quick set of evenly spaced colors.
Can I write a web-safe color in three digits?
Yes. Every web-safe channel is a repeated digit (33, 66, 99, CC, FF, 00), so CSS shorthand works: #336699 can be written #369. The three-digit form can describe 4,096 colors, and the 216 web-safe colors are a subset of those.
Which web-safe colors have names?
Only a few. Most of the 216 have no standard name. A handful match CSS named colors, such as #000000 (black), #FFFFFF (white), #FF0000 (red) and #00FF00 (lime).
Content updated