Xerobit

Gray Hex Code and Color Values

Gray (CSS keyword gray) is #808080: rgb(128, 128, 128), hsl(0, 0%, 50%). Same value as grey.

Gray: #808080

  • Hex
    #808080
  • RGB
    rgb(128, 128, 128)
  • HSL
    hsl(0, 0%, 50%)
  • OKLCH
    oklch(60.0% 0.0000 0.0)
  • CMYK
    0%, 0%, 0%, 50%
  • CSS name
    gray

Where the name gray comes from

One of the sixteen HTML 4.01 names (section 6.5), value #808080; CSS Color 4 says these came from the VGA palette.

gray and grey are the same color in CSS: both are #808080 in the CSS Color 4 table. The names do not order by lightness: darkgray (#A9A9A9) is lighter than gray, and dimgray (#696969) is the darker one. From dark to light the neutral names are dimgray, gray, darkgray, silver, lightgray, gainsboro, whitesmoke.

No three-digit short form.

Shades and tints of Gray

  • 10% white #8D8D8D lightslategray; 10% black #737373 dimgray
  • 20% white #999999 ; 20% black #666666 dimgray
  • 30% white #A6A6A6 darkgray; 30% black #5A5A5A
  • 40% white #B3B3B3 darkgray; 40% black #4D4D4D darkslategray
  • 50% white #C0C0C0 silver; 50% black #404040 darkslategray

Contrast of #808080

Against white 3.95:1 (large text only), against black 5.32:1 (passes AA); black text reads better on Gray. In HSV it is hsv(0, 0%, 50%).

Lightness rank 102 of 139; best partner black, 5.32:1.

Closest names to Gray

Gray has no hue (OKLCH chroma 0.000). 1 of its 7 nearest keywords is neutral, the others have a hue.

NameHexOKLab distanceThan Gray
slategray#7080900.032darker
lightslategray#7788990.038lighter
dimgray#6969690.079darker
cadetblue#5F9EA00.087lighter
steelblue#4682B40.100darker
darkcyan#008B8B0.101darker
rosybrown#BC8F8F0.108lighter

Color harmony for Gray

No hue, so every harmony scheme is Gray itself.

Gray with color vision deficiency

  • Protanopia: #808080, like darkcyan (#008B8B), teal (#008080), palevioletred (#DB7093)
  • Deuteranopia: #808080
  • Tritanopia: #808080

FAQ

What is the hex code for Gray?

#808080, or the keyword gray or grey.

Which named color is closest to Gray?

slategray (#708090), then lightslategray and dimgray.