Free tool · Color palettes · Runs in your browser

Color palette for gray

No uploadRuns in your browserReviewed October 10, 2026

Short answer

Gray is #808080: the CSS color named gray, defined by the W3C, written rgb(128, 128, 128) or hsl(0, 0%, 50%). Its complement is #808080; analogous colors are #808080 and #808080; a triad adds #808080 and #808080.

#808080 · rgb(128, 128, 128) · hsl(0, 0%, 50%) · contrast 3.95:1 on white, 5.32:1 on black

Complementary

Analogous

Triadic

Split complementary

Tetradic (rectangle)

Square

Tints (toward white)

Shades (toward black)

CSS variables for the analogous palette
:root {
  --color-1: #808080;
  --color-2: #808080;
  --color-3: #808080;
}

Nothing is uploaded. Click a color to copy its hex code.

Key takeaways

  • Gray is #808080, rgb(128, 128, 128), hsl(0, 0%, 50%), CIELAB 53.6, -0.0, 0.0.
  • Contrast: 3.9:1 on white and 5.3:1 on black. Black text on gray passes the WCAG AA minimum of 4.5:1.
  • Its complement is #808080; the analogous colors are #808080 and #808080; the triad is #808080, #808080, #808080.
  • 0 of the 9 tints and 9 of the 9 shades have at least 4.5:1 on a white background; the first shade that does is #737373.
  • Photographs rich in gray gave #6B6B6D, #828385, #999A9B, #58585A, #4A494A, #B1B3B2; the nearest of their colors to #808080 was 3.0 CIEDE2000 units away.
  • For people with deuteranopia the closest pair in the triad is 0.0 apart, against 0.0 for typical vision.

Measured: a palette for gray, from photographs

On white it has a contrast ratio of 3.9:1 (fails the WCAG AA minimum of 4.5:1 for normal text) and on black 5.3:1. A palette extracted from three photographs rich in gray (77%, 66% and 66% of their pixels near the hue) came out as #6B6B6D, #828385, #999A9B, #58585A, #4A494A, #B1B3B2.

We searched Wikimedia Commons for gray subjects and kept photographs under Creative Commons or public domain licenses. Of 12 candidates we kept the three with the largest share of pixels that are nearly gray and mid-lightness. The tool's own palette code (k-means in CIELAB, no random numbers) found five colors in each photograph. The six colors in the table below come from only the pixels inside the color window, from the three photographs, so they are six shades and neighbors of gray rather than the whole picture.

Six shades of gray found in the three photographs, most common first.
ColorShareNearest CSS nameContrast on whiteContrast on black
#6B6B6D22.5%near dimgray5.32:13.95:1
#82838517.6%near gray3.79:15.53:1
#999A9B17.0%near darkgray2.82:17.45:1
#58585A15.9%near dimgray7.10:12.96:1
#4A494A13.9%near dimgray8.96:12.34:1
#B1B3B213.1%near darkgray2.11:19.96:1

Gray appears here as near dimgray, near gray, near darkgray, near dimgray, near dimgray, near darkgray. The photo palette is a starting point: colors from a photograph are rarely pure, and the table shows how each performs as text on white and black.

Measured: the photographs

The photographs and the five colors found in each (percent of pixels).
PhotographPhotographer, licensePixels near the hueFive colors
Ewer with Elephant-Headed Spout Unknown artistUnknown artist, CC077%#6B6969 34%, #4E4C4C 30%, #999697 16%, #C8C6C8 14%, #262824 6%
Surfaces rocks on the groundTomwsulcer, CC066%#C0BFBF 28%, #979697 26%, #6D6C6F 20%, #454549 16%, #1E1C1F 11%
Red pebbles gray rocksTitus Tscharntke, Public domain66%#9EA2A4 29%, #787D7F 28%, #C7CBCC 19%, #52575B 16%, #282C32 8%

The photographs are credited with their Wikimedia Commons license. The extracted lists are the exact tool output.

Colors that go with gray

Color harmonies built on #808080, with how well each can be told apart (CIEDE2000, higher is easier; about 1 is a just noticeable difference).
HarmonyColorsClosest pair, typical visionProtanopiaDeuteranopiaTritanopia
Complementary#808080, #8080800.00.00.00.0
Analogous#808080, #808080, #8080800.00.00.00.0
Triadic#808080, #808080, #8080800.00.00.00.0
Split complementary#808080, #808080, #8080800.00.00.00.0
Tetradic (rectangle)#808080, #808080, #808080, #8080800.00.00.00.0
Square#808080, #808080, #808080, #8080800.00.00.00.0

The complement, #808080, sits opposite #808080 on the color wheel (hue + 180 degrees); Wikipedia's color scheme article describes analogous schemes as neighbors on the wheel and a triadic scheme as colors 120 and 240 degrees apart. Under protanopia, deuteranopia and tritanopia the colors are simulated with the Machado model at full severity; a closest pair below about 10 is hard to tell apart.

Gray in numbers

Gray in the common color notations.
NotationValue
Hex#808080
RGBrgb(128, 128, 128)
HSLhsl(0.0, 0.0%, 50.2%)
CMYK (simple conversion)0%, 0%, 0%, 50%
CIELAB (D65)53.6, -0.0, 0.0
Nearest CSS color namegray #808080 (exact)
Contrast on white3.95:1
Contrast on black5.32:1

Tints, shades and accessible text

Tints and shades of #808080 in 10% steps, with contrast on a white background.
StepTint (toward white)Contrast on whiteShade (toward black)Contrast on white
10%#8D8D8D3.32:1#7373734.74:1
20%#9999992.85:1#6666665.74:1
30%#A6A6A62.43:1#5A5A5A6.90:1
40%#B3B3B32.10:1#4D4D4D8.45:1
50%#C0C0C01.82:1#40404010.37:1
60%#CCCCCC1.61:1#33333312.63:1
70%#D9D9D91.41:1#26262615.13:1
80%#E6E6E61.25:1#1A1A1A17.40:1
90%#F2F2F21.12:1#0D0D0D19.44:1

0 tints and 9 shades reach 4.5:1 against white. The WCAG success criterion 1.4.3 asks for at least 4.5:1 for normal text and 3:1 for large text; criterion 1.4.6 asks for 7:1 for the enhanced level.

Use it in CSS

:root { --gray-1: #6b6b6d; --gray-2: #828385; --gray-3: #999a9b; --gray-4: #58585a; --gray-5: #4a494a; --gray-6: #b1b3b2; }

The complement and analogous colors of #808080: #808080, #808080, #808080.

Free tools:Color palette generatorPalette from an imageImage to textCompress an image

Check the contrast before you use it for text

  • Gray #808080 on white: 3.95:1; on black: 5.32:1.
  • The darkest shade in the table, #0D0D0D, reaches 19.44:1 on white.
  • Large text (at least 18 point, or 14 point bold) needs 3:1; normal text needs 4.5:1; the enhanced level needs 7:1.
  • Do not use color as the only way to tell things apart: about 1 in 12 men have a color vision deficiency.

How the numbers were made

The hex value of gray is the W3C CSS named color. Harmonies rotate the hue in HSL and keep saturation and lightness. Contrast follows the WCAG 2 definition with relative luminance. Color differences use CIEDE2000, which Wikipedia notes is designed so that a difference of 1.0 stands for a just noticeable difference. Color blindness is simulated with the matrices of Machado, Oliveira and Fernandes (2009) at severity 1.0. Palette extraction: pixels are grouped into 32 levels per channel and clustered with k-means in CIELAB; the same picture always gives the same palette. The accuracy test on pictures of known colors is on the palette generator page.

Questions people ask

What is the hex code for gray?

Gray is #808080 (the W3C CSS named color), rgb(128, 128, 128).

What color goes with gray?

The complement of #808080 is #808080. Analogous colors are #808080 and #808080; a triad is #808080, #808080, #808080.

Is #808080 accessible for text?

On white it has 3.95:1 and on black 5.32:1. The WCAG AA minimum for normal text is 4.5:1, so black text on #808080 passes.

Can people with color blindness tell the gray palette apart?

For the six colors of the photo palette, the closest pair is 5.2 apart for typical vision and 5.2 for deuteranopia (CIEDE2000; below about 10 is hard).

How was the palette made?

The tool found the dominant colors of the photographs with k-means clustering in CIELAB. It runs in your browser; you can do the same with your own picture on the palette from image page.

Can I use these colors commercially?

Colors themselves are not licensed. The photographs used to find them keep their Creative Commons licenses, shown in the table.

Can I get a palette from my own photo?

Yes. Use the palette from an image tool; nothing is uploaded.

How many colors should a palette have?

Many designs use five: one dominant, one or two supporting, one accent and a neutral. The tool lets you choose 3 to 10 when you extract from a picture.

What is the difference between tints and shades?

A tint mixes the color with white and a shade mixes it with black. The table shows nine of each in steps of 10%.

Related

Sources and how we checked

  1. W3C: CSS Color Module Level 4 (named colors) (read 2026-10-10)
  2. W3C: Understanding Success Criterion 1.4.3, Contrast (Minimum) (read 2026-10-10)
  3. W3C: Understanding Success Criterion 1.4.6, Contrast (Enhanced) (read 2026-10-10)
  4. Wikipedia: Color scheme (read 2026-10-10)
  5. Wikipedia: Color difference (CIEDE2000) (read 2026-10-10)
  6. Machado, Oliveira and Fernandes: A physiologically-based model for simulation of color vision deficiency (2009) (read 2026-10-10)
  7. Wikimedia Commons (the photographs, under the licenses shown) (read 2026-10-10)

Reviewed October 10, 2026. The palettes were found with the tool's own code from Creative Commons photographs; contrast, harmonies and color differences are computed. The files and results are in data/seo/hub/evidence/2026-10-10/palette.