TintShelf
Interface

Gray Color Code: Hex #808080

The hex code for Gray is #808080 (the CSS keyword gray). Gray RGB code: rgb(128, 128, 128). The xkcd color survey gives #929591 instead, which looks slightly different; both codes are below with their source.

CSS Color 4, meodai color-name-list#808080Top: the code browsers use
xkcd color survey#929591Below: compare edge to edge

Gray color codes: each Gray hex code in every format

HEX#808080
RGBrgb(128, 128, 128)
HSLhsl(0, 0%, 50%)
OKLCHoklch(60.0% 0.000 0.0)
LABlab(53.6 0.0 0.0)
CMYKcmyk(0%, 0%, 0%, 50%)

Sources

CSS Color 4web standard keyword
xkcd color survey2010 naming survey
meodai color-name-listopen community list

Properties

Hex codes
2 different ones in 3 color lists; they look slightly different
Family
gray
Contrast
3.95:1 with white, 5.32:1 with black
CSS keyword
gray
Also written
grey
Character
mid-tone, near-neutral
Readable text on it
black (AA)

HTML reserves gray for 50% gray; in the older X11 list gray was a much lighter 74.5% gray, close to the web’s silver.

A mid-tone, almost neutral tint. In code, gray gives exactly this web value. If you mean the color as people usually picture the name, the survey value #929591 is closer: it is lighter and about as saturated.

Black text reads best on it; white text works only for large headings. Next to Dim Gray, its closest named neighbour, it looks lighter, about as saturated and neither warmer nor cooler; beside Slate Gray it looks about as light, more muted and warmer. It is one of the 16 original HTML 4 color names.

Colors that go with Gray

Complementary: the opposite of Gray

Open in generator

  • #808080Black text 5.32:1
  • #808080Black text 5.32:1
  • #B7B7B7Black text 10.47:1
  • #4D4D4DWhite text 8.45:1

Analogous

Open in generator

  • #808080Black text 5.32:1
  • #808080Black text 5.32:1
  • #808080Black text 5.32:1
  • #CACACABlack text 12.81:1

Triadic

Open in generator

  • #808080Black text 5.32:1
  • #808080Black text 5.32:1
  • #808080Black text 5.32:1
  • #DEDEDEBlack text 15.61:1

Monochrome

Open in generator

  • #1F1F1FWhite text 16.48:1
  • #4D4D4DWhite text 8.45:1
  • #808080Black text 5.32:1
  • #A4A4A4Black text 8.42:1
  • #CACACABlack text 12.81:1

With neutrals

Open in generator

  • #808080Black text 5.32:1
  • #DEDEDEBlack text 15.61:1
  • #0B0B0BWhite text 19.68:1
  • #808080Black text 5.32:1

How tints, shades and harmonies are calculated

Preview

Heading on Gray

Body text on this color, 5.32:1.

Button

Heading in Gray

Text in this color on white, 3.95:1.

Button

Tints and shades

  1. #DEDEDE
  2. #CACACA
  3. #B7B7B7
  4. #A4A4A4
  5. #929292
  6. #808080
  7. #666666
  8. #4D4D4D
  9. #353535
  10. #1F1F1F
  11. #0B0B0B

WhiteGrayBlack

Similar named colors

Where the name comes from

Try it:

Screens show the same code differently, and print adds more variation. CMYK here is the plain formula without a printer profile, so use it as a starting point, not a press value. Contrast numbers follow WCAG 2.x.