Web Safe Colors: All 216 Hex Codes (Click to Copy)

This is the complete chart of web safe colors: all 216 colors, each with its hex code. Click any swatch to copy the code for your CSS or design tool, and use the buttons to switch between six-digit hex, three-digit short hex and RGB values.

Click a color to copy its code.
Red 00 (0)
Red 33 (51)
Red 66 (102)
Red 99 (153)
Red CC (204)
Red FF (255)

Quick answer: The 216 web safe colors are every combination of the six values 00, 33, 66, 99, CC and FF for red, green and blue, for example #3366CC or #FF9900. Click any color in the chart above to copy its hex code.

What are web safe colors?

In the mid-1990s, many computers could only show 256 colors at once. Browsers on those screens reserved some colors for the operating system and used a fixed palette of 216 colors that looked the same on Windows and Mac. Colors outside that palette were dithered into a speckled pattern, so designers stuck to the 216 “safe” ones.

The palette is easy to remember. Each of the red, green and blue channels can only take six values:

  • 00 = 0
  • 33 = 51
  • 66 = 102
  • 99 = 153
  • CC = 204
  • FF = 255

Six values for each of three channels gives 6 × 6 × 6 = 216 colors. The chart above groups them by their red value. Within each group, every row is one green value, and blue increases from left to right.

Do you still need web safe colors in 2026?

No. Every phone, laptop and monitor today shows millions of colors, so any hex code displays correctly. The web safe color palette is still useful as:

  • A simple, evenly spaced starting palette for quick mock-ups, charts and diagrams.
  • A source of short codes. Because each pair repeats a digit, every web safe color has a three-digit CSS hex shorthand: #3366CC can be written #36C.
  • A reference when maintaining old websites, email templates and legacy software that still use the palette.

Pair your colors with fonts that work everywhere: see our web safe fonts list. To pick colors from any web page or image, try one of these free color picker tools.

How to use these colors in CSS

  1. Click a swatch to copy its code.
  2. Paste it into your stylesheet, for example color: #336699; or background: #FFCC00;.
  3. Switch to RGB if you need the rgb(51, 102, 153) format, for example to add transparency with rgb(51 102 153 / 50%).

FAQ

How many web safe colors are there?

There are 216. Some lists show 252 or more because they repeat colors, but only 216 unique combinations exist.

Is black a web safe color?

Yes. Black (#000000) and white (#FFFFFF) are both in the palette, along with four grays: #333333, #666666, #999999 and #CCCCCC.

Are web safe colors good for accessibility?

Not automatically. Accessibility depends on the contrast between text and background, not on the palette. Check pairs with a contrast checker; dark text on #FFFFCC or white text on #003366 both work well.

What is the difference between hex and short hex?

Short hex writes each pair as one digit, so #FF9900 becomes #F90. It only works when both digits in each pair are the same, which is true for every web safe color.

More free tools

See all of them on the QuickOnlineTips free online tools page.