Color reference

Gray #808080

Gray is the standard CSS named color #808080. “Grey” is an equivalent CSS spelling with the same RGB value.

Gray is the CSS named color keyword gray, standardized at #808080 in sRGB.

Gray #808080 5.32:1 with black text

Color values

HEX#808080
RGBrgb(128, 128, 128)
HSLhsl(0 0% 50%)
HSV0°, 0%, 50%
CMYK0%, 0%, 0%, 50%

HEX/RGB/HSL/HSV are deterministic sRGB representations. CMYK here is a mathematical approximation, not a printer-profile conversion.

Black or white text?

Black text 5.32:1 — AA normal text passes
White text 3.95:1 — AA normal text fails

AA normal text: black passes; white fails.

AA large text: black passes; white passes.

WCAG contrast thresholds use 4.5:1 for normal text and 3:1 for large text. Do not round a near-threshold result upward when testing conformance.

Tints and shades of Gray

These steps are computed by RGB-mixing #808080 toward white or black. They are generated values, not official named colors.

80% tint #E6E6E6
60% tint #CCCCCC
40% tint #B3B3B3
20% tint #999999
Base #808080
20% shade #666666
40% shade #4D4D4D
60% shade #333333
80% shade #1A1A1A

Need more control? Use the Tints and Shades Generator or Lighten / Darken tool.

CSS usage

.example {
  color: #000000;
  background-color: gray;
}

You can use either gray or #808080 in CSS; both resolve to the same sRGB color.