Color family
Shades of gray
A medium neutral gray. The reference gray is #808080, as defined by the CSS named color.
| HEX | #808080 | |
|---|---|---|
| RGB | rgb(128, 128, 128) | |
| HSL | hsl(0, 0%, 50%) | |
| HSV | hsv(0, 0%, 50%) | |
| OKLCH | oklch(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.
| Name | HEX | Source | Compared with the reference |
|---|---|---|---|
| Gray | #808080 | CSS named color | Reference shown on this page |
| Grey | #929591 | xkcd Color Survey | Noticeably different · 73% similar |
| Grey | #808080 | Color Names (meodai) | Same color |
Gray vs Taupe
#808080
#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
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
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;
}