Gray color: hex codes, shades and palettes

Palettes built around gray. Click any swatch to copy its hex code.

Gray is #808080 — grey. Below are its shades with hex codes, the values in every common format, and gray color palettes to copy.

Gray hex, RGB, HSL and OKLCH

#808080
HEX
#808080
RGB
rgb(128, 128, 128)
HSL
hsl(0, 0%, 50%)
OKLCH
oklch(60.0% 0.000 89.9)
On white
3.95:1
On black
5.32:1

Shades of gray

Eleven steps from one base color, generated in OKLCH so each step is an equal perceived step rather than an equal numeric one. Click a swatch to copy it.

Contrast and readability

Gray on white measures 3.95:1 and on black 5.32:1. WCAG AA asks for 4.5:1 on normal text and 3:1 on large text and UI components, so the higher of those two decides which background it belongs on. In the scale above, 500 is the first to clear 4.5:1 on white, at 5.25:1.

The contrast checker reports every level for a given pair and suggests the nearest passing shade on the same hue. The color picker builds this same scale from any color you paste in.

Related colors:silver, slate, pewter. See every shade on the colors index.