Short answer
Web colors are the standardized colors defined by the CSS Color Module. The standard includes 148 named colors — from aliceblue to yellowgreen — plus the HEX, RGB, HSL, HWB, Lab, LCH, OKLab and OKLCH syntaxes used to describe any color in CSS.

The CSS named colors

CSS defines 148 named colors. They come from two original sources that were merged and standardized over time:

  • X11 colors — from the X Window System, which had a large palette of named colors used by Unix graphics.
  • HTML 4 colors — a small set of 16 basic colors that were part of early HTML and CSS.

The two sets overlapped, and CSS merged them into a single list of 148 entries. Some names are duplicated (one with a U.S. spelling, one with a British spelling), which is why there are 140 unique colors described by 148 names.

The 16 original HTML colors

The original HTML color set contains 16 names, still used everywhere as a minimal palette:

Black
Silver
Gray
White
Maroon
Red
Purple
Fuchsia
Green
Lime
Olive
Yellow
Navy
Blue
Teal
Aqua

Duplicate names

Some colors have two accepted names — one U.S., one British, or two historically distinct names for the same value:

Name 1Name 2Hex
graygrey#808080
darkgraydarkgrey#A9A9A9
dimgraydimgrey#696969
lightgraylightgrey#D3D3D3
slategrayslategrey#708090
lightslategraylightslategrey#778899
darkslategraydarkslategrey#2F4F4F
aquacyan#00FFFF
fuchsiamagenta#FF00FF

Web-safe colors (historical)

In the 1990s, most computers were limited to 256-color displays. The "web-safe" palette was a set of 216 colors chosen to display consistently on those systems: each channel was limited to six values — 00, 33, 66, 99, CC, FF — producing 6³ = 216 colors.

Examples of web-safe hex codes include #FF0000 (pure red), #0099CC, #66CC33 and #330099. Modern hardware renders all 16.7 million sRGB colors consistently, so web-safe colors are no longer necessary. They remain historically interesting and occasionally appear in legacy code.

Modern color syntaxes in CSS

SyntaxExampleNotes
NamedrebeccapurpleConvenient for prototypes
HEX#663399Same color, more compact
RGBrgb(102 51 153)Readable, computable
HSLhsl(270 50% 40%)Intuitive for adjustment
HWBhwb(270 20% 40%)Whiteness and blackness
Lablab(40% 40 -35)Perceptually uniform
LCHlch(40% 55 320)Perceptually uniform, polar
OKLaboklab(0.4 0.1 -0.15)Modern perceptual
OKLCHoklch(40% 0.15 320)Modern perceptual, polar
color()color(display-p3 0.4 0.2 0.6)Wide-gamut

Should you use named colors?

  • ✓ Good for: quick prototypes, teaching examples, simple demos, spec sheets where the color name itself is the message.
  • ! Avoid in production systems — named colors are imprecise, not themeable, and force you to memorise a large list.
  • ✓ Better pattern: use numeric values (hex, rgb, oklch) named with your own semantic tokens — --color-primary, --color-surface.

Browse the full list

Our color library includes every CSS named color with hex, RGB and quick-copy swatches.

Frequently asked questions

What are web colors?

Web colors are the standard set of colors defined for use on the web, primarily by the CSS Color Module. They include 148 named colors, plus the HEX, RGB, HSL and other formats used to describe any color in CSS.

How many CSS named colors are there?

There are 148 CSS named colors. This includes 140 unique colors plus 8 duplicates — gray/grey, darkgray/darkgrey, dimgray/dimgrey, lightgray/lightgrey, slategray/slategrey, lightslategray/lightslategrey, darkslategray/darkslategrey, and aqua/cyan plus fuchsia/magenta.

What were web-safe colors?

Web-safe colors were a 216-color palette designed in the 1990s to display consistently across computers with 256-color displays. Each channel used only 6 values: 00, 33, 66, 99, CC and FF. Modern hardware makes this palette obsolete, but it is historically important.

Should I use CSS named colors in production?

Named colors are convenient for quick prototypes and educational examples, but most design systems use numeric color tokens (hex, rgb, oklch) with semantic names. This gives more precise control and easier theming.