gray (#808080)

gray is a CSS named color with the hex code #808080, rgb(128, 128, 128). It is a medium, neutral gray.

gray#808080
Keywordgray
HEX#808080
RGBrgb(128, 128, 128)
HSLhsl(0, 0%, 50%)

Full #808080 details: palettes, shades, color-blind view →

Description

Gray has a hue of 0°, saturation 0% and lightness 50%, which places it in the gray family. Its strongest channel is red (128). It is identical to grey; both keywords produce #808080.

Using gray in CSS

.title { color: gray; }
.box   { background: gray; border-color: #808080; }
.soft  { background: rgb(128 128 128 / 20%); }   /* gray at 20% opacity */

Named colors are case-insensitive and supported by every browser. Most of the 148 names come from the X11 color list adopted by early browsers.

Similar named colors

ColorHEXRGBΔE 2000
slategray#708090112, 128, 1448.9
dimgray#696969105, 105, 1059.1
lightslategray#778899119, 136, 1539.5
darkgray#a9a9a9169, 169, 16913.5
rosybrown#bc8f8f188, 143, 14318.7
steelblue#4682b470, 130, 18018.9
cadetblue#5f9ea095, 158, 16019.2
silver#c0c0c0192, 192, 19219.7

ΔE 2000 measures perceived difference: under 2 is hard to tell apart, over 10 is clearly different.

Pairs well with

Readability

Contrast with white text: 3.95:1; with black text: 5.32:1. Black body text on gray meets WCAG AA; white text does not.

Frequently asked questions

What is the hex code for gray?
#808080.
What colors are similar to gray?
slategray (#708090), dimgray (#696969), lightslategray (#778899).