Skip to content

Gray color #808080

rgb(128, 128, 128) · oklch(60% 0 0)

Gray (#808080) is a medium, grayish gray, also written as “grey” in CSS. It mixes 50% red, 50% green and 50% blue, with a perceived lightness of 60% in OKLCH. Black text reads best on it (5.31:1 vs 3.94:1). The closest other CSS color is Slate Gray (#708090).

Gray color codes

HEX
RGB
HSL
HSV / HSB
OKLCH
CMYK
CSS keyword

Click a value to copy it. Convert any other color with the color converter.

Shades, tints and tones of gray

Shades mix gray with black, tints mix it with white, and tones mix it with gray. Mixing happens in OKLab, so the steps look evenly spaced.

Tints (lighter)

Shades (darker)

Tones (muted)

Gray as a UI color scale (50–950)

An 11-step scale for design systems, with gray placed at step 500. Copy it as a Tailwind v4 theme below.

Colors that go with gray

Harmonies are computed on the OKLCH hue wheel, keeping gray’s lightness and saturation where the sRGB gamut allows. Open any row in the palette generator to adjust it.

Complementary

Edit

The base color and the hue directly opposite it. Maximum contrast; use one as the accent.

Analogous

Edit

Neighbors 30° either side on the hue wheel. Calm and cohesive, common in nature.

Triadic

Edit

Three hues spaced 120° apart. Vibrant but balanced; let one dominate.

Split complementary

Edit

The base plus the two hues beside its complement (±30°). Contrast with less tension than complementary.

Tetradic (rectangle)

Edit

Two complementary pairs (rectangle: 0°, 60°, 180°, 240°). Rich; needs one dominant color.

Monochromatic

Edit

One hue at different lightness levels. Safe, elegant, and easy to read.

Is gray accessible? Contrast with white and black

Gray text on white

3.94:1

AA fail AA large pass AAA fail

Gray text on black

5.31:1

AA pass AA large pass AAA fail

Check gray against any other color

How gray looks with color blindness

Simulated with the Machado et al. (2009) model. Around 1 in 12 men and 1 in 200 women have some form of color vision deficiency.

Protanopia: #808080
Red-blind. Reds look dark and brownish; red and green are easily confused.
Deuteranopia: #808080
Green-blind, the most common strong form. Red, green, orange and brown look similar.
Tritanopia: #808080
Blue-blind and rare. Blue and green are confused, as are yellow and pink.
Achromatopsia: #808080
Total color blindness, very rare. Only lightness differences are visible.

Colors similar to gray

The closest CSS named colors by perceptual distance (ΔE OK; under 2 is hard to tell apart).

ΔE 3.2 Slate Gray
#708090
ΔE 3.8 Light Slate Gray
#778899
ΔE 7.9 Dim Gray
#696969
ΔE 8.7 Cadet Blue
#5f9ea0

Use gray in CSS and Tailwind

CSS custom properties

:root {
  --gray: #808080;
  --gray-rgb: 128 128 128;
}

.text-gray { color: var(--gray); }
.bg-gray { background-color: var(--gray); }

Tailwind v4 theme

@theme {
  --color-gray-50: #f7f7f7;
  --color-gray-100: #ededed;
  --color-gray-200: #dbdbdb;
  --color-gray-300: #c1c1c1;
  --color-gray-400: #a1a1a1;
  --color-gray-500: #808080;
  --color-gray-600: #6f6f6f;
  --color-gray-700: #585858;
  --color-gray-800: #454545;
  --color-gray-900: #353535;
  --color-gray-950: #1f1f1f;
}

Make a gradient from gray: open the gradient generator.

Painting in Procreate or designing in Photoshop? See our palette packs: every color with HEX codes is free to browse, and the swatch files are a quick download.

More gray colors