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
EditThe base color and the hue directly opposite it. Maximum contrast; use one as the accent.
Split complementary
EditThe base plus the two hues beside its complement (±30°). Contrast with less tension than complementary.
Tetradic (rectangle)
EditTwo complementary pairs (rectangle: 0°, 60°, 180°, 240°). Rich; needs one dominant color.
Is gray accessible? Contrast with white and black
3.94:1
AA fail AA large pass AAA fail
5.31:1
AA pass AA large pass AAA fail
- As a background, gray works best with black text.
- For body text on white, use the darker variant (the closest color that passes AA, 4.5:1).
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.
#808080 Red-blind. Reds look dark and brownish; red and green are easily confused.
#808080 Green-blind, the most common strong form. Red, green, orange and brown look similar.
#808080 Blue-blind and rare. Blue and green are confused, as are yellow and pink.
#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).
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.