Web-Safe Colors
Browse the 216 web-safe colours and find the closest web-safe match for any colour, by simple rounding and by how close it actually looks.
How to Use
- Type or paste any colour (hex, rgb(), hsl(), a name…) or use the colour picker.
- The closest web-safe colour is shown two ways: by rounding each channel to the nearest step, and by which of the 216 looks most similar.
- The whole palette is drawn on the right with the matches outlined. Click any swatch to use it and copy its hex.
- Choose how the result is copied: full hex (#3399FF), short hex (#39F) or rgb().
Worked Example
Find the web-safe colour closest to #3B82F6 (Tailwind’s blue-500, rgb 59, 130, 246).
Each channel is divided by 51, rounded, and multiplied back:
Red: 59 ÷ 51 = 1.16 → 1 → 51 = 33 in hex.
Green: 130 ÷ 51 = 2.55 → 3 → 153 = 99.
Blue: 246 ÷ 51 = 4.82 → 5 → 255 = FF.
The rounded match is #3399FF, short form #39F.
That match is visibly lighter: green moved up by 23 steps out of 255. The tool also measures all 216 colours with CIEDE2000 and reports the difference (ΔE) for both answers, so you can see how far either one is from the original.
Show Work
Formulas
The 256-Colour Web
In the mid-1990s most computers ran in 8-bit colour: 256 colours on screen at once, chosen by the operating system. Windows and the Mac OS reserved different colours for themselves, and a browser showing any other colour had to dither it into a speckle of the ones it had. Netscape’s palette of 216 colours, the ones that existed on both systems, became the “browser-safe” palette, popularised by Lynda Weinman’s 1996 book Designing Web Graphics.
The rule outlived the problem. By the 2000s nearly every display was 16- or 24-bit, and testing by David Lehn and Hadley Stern for Webmonkey found that on 16-bit displays only 22 of the 216 actually rendered identically everywhere. Today the palette survives as a look, and as a handy set of colours with three-digit hex codes.
About This Tool
This tool reads a colour in any CSS format, snaps it to the web-safe palette by rounding each channel, and also searches all 216 colours for the one with the smallest CIEDE2000 difference, reporting it for both answers. The full palette is laid out as six slices of the RGB cube, one per red level, with both matches marked.
Click any swatch to make it the current colour and copy it as full hex, short hex or rgb(). Everything runs in your browser.
Related tools: CSS Color Names, Universal Color Converter, and Color Picker.
Frequently Asked Questions
What are web-safe colours?
The 216 colours whose red, green and blue are each one of six values: 0, 51, 102, 153, 204 or 255 (00, 33, 66, 99, CC, FF in hex). In the 1990s many screens could show only 256 colours at once; browsers reserved these 216 so that a page looked the same on Windows and Mac without dithering.
Do I still need them?
No. Virtually every screen since the early 2000s shows millions of colours, so any hex value displays correctly. Web-safe colours are now a style choice — a bold retro palette — or a constraint for very old hardware, e-ink and some embedded displays.
Why are there two “closest” answers?
Rounding each channel separately is the classic method, but it can pick a colour that looks noticeably different, because our eyes are not equally sensitive to red, green and blue. The second answer measures how different each of the 216 looks (CIEDE2000, a formula fitted to human vision) and picks the smallest difference. When they disagree, trust the second.
What is ΔE?
A number for how different two colours look, here CIEDE2000. Below about 1 most people see no difference; 2–3 is just noticeable side by side; above 5 the colours look clearly different. Web-safe matches are often 5 to 10 away, which is why the palette looks so bold.
Why can every web-safe colour be written with three hex digits?
Because each channel is a doubled digit — 00, 33, 66, 99, CC or FF — and CSS lets #RGB stand for #RRGGBB. So #3399FF can be written #39F. A colour is web-safe exactly when its short hex uses only 0, 3, 6, 9, C and F.
How do I use the Web-Safe Colors?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Is it free? Does it work without internet?
Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.
Where does my data go?
Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.
Common Use Cases
Retro and pixel-art designs
Build a 1990s-style page or game palette that is authentically web-safe, from 216 bold colours.
Limited displays
Some e-ink, LCD and embedded screens show only a few levels per channel; snapping to 6 levels previews how a design will survive.
Teaching colour
Show how 6 × 6 × 6 = 216 colours fill the RGB cube, and why channel rounding and perceived closeness can disagree.
Short hex codes
Find a colour that can be written in three hex digits for compact CSS: #3B82F6 snaps to #39F.
Last updated: