#808080

Color family

Shades of gray

A medium neutral gray. The reference gray is #808080, as defined by the CSS named color.

HEX#808080
RGBrgb(128, 128, 128)
HSLhsl(0, 0%, 50%)
HSVhsv(0, 0%, 50%)
OKLCHoklch(60.0% 0.000 89.9)
CMYK*0, 0, 0, 50

* CMYK is a simple conversion without a print profile; ask your printer for exact values.

What color is gray?

Gray (grey in British English) is any neutral tone between black and white with no noticeable hue. On a screen it is made of equal red, green and blue values. The CSS keyword gray is #808080, and in CSS every gray keyword can also be spelled grey. Oddly, CSS darkgray, #A9A9A9, is lighter than gray.

Gray hex codes by source

Color names are not standardized, so the same name can point to different colors. Here is every definition of gray in our three sources, with how close each one is to the reference.

NameHEXSourceCompared with the reference
Gray#808080CSS named colorReference shown on this page
Grey#929591xkcd Color SurveyNoticeably different · 73% similar
Grey#808080Color Names (meodai)Same color

Gray vs Taupe

Gray
#808080
Taupe
#B9A281

Taupe is a gray with a clear brown cast; gray is neutral. In numbers: the two are 46% similar (OKLab distance 0.135). See Taupe for its own codes.

Named shades of gray

39 names in the CSS keywords and the xkcd Color Survey belong to the gray family. To give a fuller range, 21 more gray names come from the Color Names list. They are sorted from light to dark; click a swatch to copy its code, or open the ones with their own page.

Light gray shades 15

Medium gray shades 35

Gray#808080CSS

Dark gray shades 10

Tints and shades of gray

The same hue from light to dark, generated in OKLab so the steps look even. Click a step to copy its HEX code.

Colors that go with gray

Classic color-wheel combinations built on #808080, computed in OKLCH so the partners keep the same lightness and intensity. Each swatch shows the nearest common name.

Complementary

Analogous

Triadic

Split complementary

Gray with white and black text

White text3.95:1 · AA large text
Black text5.32:1 · AA

WCAG asks for a contrast of at least 4.5:1 for body text (AA) and 3:1 for large text. On a gray background, black text is the better choice.

Use gray in CSS

.gray {
  color: #808080;
  /* or */ color: rgb(128 128 128);
  /* or */ color: hsl(0 0% 50%);
  /* or */ color: oklch(60.0% 0.000 89.9);
  /* CSS keyword */ color: gray;
}

More gray colors