Gray — #808080
One of the 148 named colours defined by CSS — this page is its complete working profile: every format, WCAG contrast, a 50–950 shade scale and computed harmonies, all copy-ready.
Gray values in every format
| CSS name | gray |
|---|---|
| HEX | #808080 |
| RGB | rgb(128, 128, 128) |
| RGB % | 50%, 50%, 50% |
| HSL | hsl(0, 0%, 50%) |
| HSV / HSB | 0°, 0%, 50% |
| CMYK (print) | 0%, 0%, 0%, 50% |
| Relative luminance | 0.216 |
| Contrast on black | 5.32 : 1 |
| Contrast on white | 3.95 : 1 |
| Best text colour on it | Black (5.32 : 1 — passes WCAG AA for normal text) |
Named colours are defined in the CSS Color Module (W3C). Values on this page were computed with the same colour maths as Loona's Colour Converter and checked 9 November 2026.
Shades of Gray (50–950)
50 #F7F7F7100 #EDEDED200 #D6D6D6300 #B8B8B8400 #949494500 #757575600 #5E5E5E700 #4A4A4A800 #383838900 #262626950 #171717
The scale keeps Gray's hue (0°) and saturation (0%) and steps lightness — the same method as the Colour Shades Generator, so these steps drop straight into a design system.
Colour harmonies with Gray
Complementary: #808080#808080
Analogous: #808080#808080#808080
Triadic: #808080#808080#808080
Split-complementary: #808080#808080#808080
Square: #808080#808080#808080#808080
Computed by rotating the hue wheel from 0°. Try them live in the Colour Harmony Generator.
Closest named colours
slategray (#708090) · lightslategray (#778899) · dimgray (#696969)
Same-value alias: grey — an identical #808080 under another CSS name (this page uses the primary spelling; British “grey” spellings duplicate the “gray” values and are covered on those pages).
Using Gray well
Gray sits in the neutral (grey family) family at 50% lightness — a mid-tone, muted, neutral colour. As a background it pairs best with black text (5.32:1 contrast). Its complement (#808080) is the high-energy partner for calls-to-action and highlights; the analogous neighbours (#808080, #808080) give calm, same-family gradients. For print, start from the CMYK values above and proof — screen Gray is an sRGB colour and rich screens shades can shift on press.
Popular Design Tools
Frequently Asked Questions
What is the hex code for Gray?
#808080 — the CSS named colour “gray”. Its RGB is (128, 128, 128).
Is Gray good for text or backgrounds?
As a background, black text reads best on it (5.32:1). As text itself on white it reaches 3.95:1 — not enough for body text at AA; use it for headings, large text or accents.
What colours go with Gray?
Its complement #808080 for contrast, analogous #808080 and #808080 for calm combinations, and the 50–950 shade scale above for monochrome designs.
What is Gray in CMYK for printing?
C0 M0 Y0 K50. CMYK conversions of screen colours are a starting point — always proof before a print run.