HTML Color Codes & CSS Color Names

Every named color CSS supports, grouped by family with HEX and RGB values. Click a swatch to copy it, or pick any color to find its closest CSS name.

Loading tool…

About the HTML Color Codes

CSS Color Module Level 4 defines 148 named colors, from aliceblue to yellowgreen. Most come from the X11 color list adopted by early browsers; rebeccapurple (#663399) was added in 2014 in memory of Eric Meyer's daughter. Nine are aliases with identical values: seven gray/grey spelling pairs, plus aqua/cyan and fuchsia/magenta.

Names are case-insensitive and work anywhere a color is accepted, such as color: tomato or background: linear-gradient(gold, orange). Some names are counter-intuitive: darkgray (#a9a9a9) is lighter than gray (#808080), and the CSS green is #008000, not the pure #00ff00, which is called lime. Names also resolve in SVG attributes such as fill="steelblue".

The families here follow common groupings (reds, pinks, browns, whites and so on). The picker finds the nearest named color by distance in the perceptual OKLab space, which matches human judgement better than comparing RGB numbers. Filtering and copying happen instantly in the page, so the list also works offline once loaded.

How to use it

  1. Type part of a name or hex code in the filter box.
  2. Choose a color family to narrow the list.
  3. Pick what a click copies: HEX, name or rgb().
  4. Click a swatch to copy it, or use the picker to find the closest named color.

Frequently asked questions

How many named colors are there in CSS?
148, including duplicate spellings such as gray and grey. The keywords transparent and currentcolor are special values and are not counted.
Are HTML color names supported in all browsers?
Yes. All 148 names work in every current browser; rebeccapurple is the newest and is supported since 2014.
Should I use color names or hex codes?
Names are readable for quick prototypes, but design systems usually use hex, rgb() or oklch() values so every shade can be tuned precisely and stored as tokens.
Why is darkgray lighter than gray?
The names come from the X11 color list, where gray was defined separately from the darkgray/lightgray series. CSS kept both definitions for compatibility.

Related tools