CSS Color Names

CSS Color Names Chart

HEX, RGB and HSL codes for all 148 colors you can use by name in CSS and HTML. Click a value to copy it.

Red

ColorNameHEXRGBHSL

Pink

ColorNameHEXRGBHSL

Orange

ColorNameHEXRGBHSL

Yellow

ColorNameHEXRGBHSL

Green

ColorNameHEXRGBHSL

Cyan

ColorNameHEXRGBHSL

Blue

ColorNameHEXRGBHSL

Purple

ColorNameHEXRGBHSL

Brown

ColorNameHEXRGBHSL

White

ColorNameHEXRGBHSL

Gray and black

ColorNameHEXRGBHSL
/ lightgrey
/ darkgrey
/ dimgrey
/ grey
/ lightslategrey
/ slategrey
/ darkslategrey

How to read color codes

  • Color name: An English keyword such as tomato or skyblue. Names are case-insensitive and easy to remember, but the palette is fixed.
  • HEX: Red, green and blue as two hexadecimal digits each (00–FF) after a #, as in #FF6347. It can be shortened to three digits (#F00), and an eight-digit value (#FF634780) adds alpha in the last two digits.
  • RGB: Red, green and blue from 0 to 255, as in rgb(255, 99, 71). Add alpha with rgb(255 99 71 / 50%).
  • HSL: Hue (0–360 degrees), saturation and lightness, as in hsl(9, 100%, 64%). Changing only the lightness gives lighter and darker steps of the same color.

Using color names in CSS

.title {
  color: navy;
  background-color: aliceblue;
  border: 1px solid lightsteelblue;
}

/* The same colors as codes */
.title {
  color: #000080;
  background-color: #F0F8FF;
  border: 1px solid #B0C4DE;
}

Frequently asked questions

How many CSS color names are there?

There are 148. That includes 7 gray/grey spelling pairs and two pairs with the same value (aqua and cyan, fuchsia and magenta), so there are 139 distinct colors. The keywords transparent and currentColor are separate.

Are gray and grey different colors?

No. CSS accepts both the American (gray) and British (grey) spelling, and all 7 pairs such as darkgray/darkgrey and lightgray/lightgrey are identical.

Why is darkgray lighter than gray?

The named colors merge two lists: the 16 basic HTML colors and the X11 color names. gray (#808080) comes from HTML and darkgray (#A9A9A9) from X11, which leaves darkgray lighter than gray.

Are CSS color names case-sensitive?

No. Tomato, tomato and TOMATO are the same. Lowercase is the convention.

Should I use color names in production CSS?

They are fine for prototypes, demos and obvious values like white, black and transparent. For a design system, define your own HEX or HSL values as CSS variables so shades stay consistent.

Related tools