Skip to content

Web Safe Colors Chart

Browse the complete historical 216-color web-safe cube and snap any HEX color to its nearest channel-level match.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Browse the 216 swatches and select any color to display and copy its complete six-digit HEX value.
  2. 2.To match another color, enter a valid 3-digit or 6-digit HEX code and select Find match.
  3. 3.Use the selected result as a historical palette reference, then test real foreground and background pairs for contrast separately.

About Web Safe Colors Chart

Web Safe Colors Chart presents the complete historical 216-color browser-safe palette as an interactive grid. Every swatch has red, green, and blue channels chosen from six levels: 0, 51, 102, 153, 204, and 255, written in hexadecimal as 00, 33, 66, 99, CC, and FF. Combining six choices independently across three channels creates 6 × 6 × 6, or 216, unique colors. Click a swatch to select it and copy the full six-digit HEX code, or enter another HEX color to find the nearest member of the cube.

The browser-safe palette comes from an era when many displays could show only 256 indexed colors at once. Using a shared cube reduced the chance that a browser would dither a page color into a speckled approximation. W3C's historical introduction to CSS documents the six evenly spaced channel levels, and a W3C Web Accessibility Initiative example independently lists a 216-choice color picker. The generated table is checked for exactly 216 entries, unique HEX values, and channel membership in the six allowed levels.

Modern computers, phones, and browsers normally support millions or billions of displayable color combinations, so web-safe colors are no longer a compatibility requirement for ordinary website styling. The chart remains useful for studying quantized RGB cubes, selecting a deliberately constrained retro palette, creating low-color artwork, teaching hexadecimal channels, or reproducing an older design. “Web safe” here is a historical name, not a claim that every swatch is safe for text, accessibility, printing, branding, or every current display technology.

The nearest-color function accepts either three hexadecimal digits or six. A three-digit value such as #abc expands according to normal CSS shorthand rules to #aabbcc before matching. Each 8-bit channel is rounded independently to the nearest multiple of 51, then the three snapped levels are reassembled. For example, #3470d0 maps to #3366cc. This is equivalent to nearest distance in the ordinary unweighted RGB cube because the axes are independent and evenly spaced. It is not a perceptual color-difference calculation and does not account for how human vision weighs channel changes.

Independent channel snapping makes the result predictable and easy to audit, but the visually closest swatch can sometimes differ from the Euclidean RGB result. Gamma-encoded sRGB values are not perceptually uniform. A specialist workflow might instead compare colors in Lab or OKLCH, account for an ICC profile, or optimize a palette across an entire image. This page intentionally keeps the legacy palette's simple construction visible. It does not label colors with subjective names or imply equivalence to Pantone, CMYK inks, material samples, or device-calibrated output.

Each swatch displays a shortened three-character hint to keep the 216-item grid compact, while its accessible label and title contain the complete six-digit value and RGB triplet. Selecting a swatch shows the full value in a larger result area. Clipboard access can be denied by browser permissions; when that happens, the visible code remains available for manual selection. The table is generated in deterministic red-major, green-middle, blue-minor order from the six source levels rather than copied from an opaque hard-coded list.

A palette entry is not automatically readable as foreground text. Contrast depends on both the foreground and background, font size, weight, and the applicable accessibility criterion. After choosing colors, test the actual pair with Color Contrast Checker instead of assuming that a famous historical palette guarantees legibility. Likewise, do not restrict a modern brand or data visualization to these 216 choices unless the creative brief calls for that constraint. Use this chart as a transparent reference, matcher, and copy aid while keeping its dated compatibility purpose explicit.

Methodology & sources

The chart is generated as the Cartesian product of channel levels 0, 51, 102, 153, 204, and 255, yielding exactly 216 unique RGB/HEX records. The matcher expands CSS three-digit shorthand when needed and rounds each validated 8-bit channel independently to its nearest multiple of 51.

Frequently asked questions

Do websites still need web-safe colors?
No. Modern displays and browsers support far more than 216 colors. The palette is mainly a historical reference and deliberate design constraint.
How is the nearest color calculated?
Each RGB channel is rounded independently to the nearest one of 0, 51, 102, 153, 204, or 255, then recombined.
Does web-safe mean accessible for text?
No. Text accessibility depends on contrast between a foreground and background plus text characteristics. Test the actual pair separately.
Why are there exactly 216 colors?
There are six allowed levels for each of three RGB channels, producing 6 × 6 × 6 unique combinations.

Color Tools guides

View all