Gray #808080

Gray#808080 · rgb(128, 128, 128)

Gray color codes

CSS namegray
HEX#808080
RGBrgb(128, 128, 128)
HSLhsl(0, 0%, 50%)
CMYKcmyk(0%, 0%, 0%, 50%)
Decimal8421504

Shades of Gray (darker)

#737373 · #666666 · #5A5A5A · #4D4D4D · #404040 · #333333 · #262626 · #1A1A1A · #0D0D0D

Tints of Gray (lighter)

#8D8D8D · #999999 · #A6A6A6 · #B3B3B3 · #C0C0C0 · #CCCCCC · #D9D9D9 · #E6E6E6 · #F2F2F2

Color harmonies

Complementary
#808080
Triadic
#808080, #808080
Analogous
#808080, #808080

Accessibility (WCAG contrast)

White text on Gray3.95:1 · AA large text only
Black text on Gray5.32:1 · AA

Use Gray in code

.element {
  color: gray;          /* or #808080 */
  background-color: rgb(128 128 128 / 0.5);
}

Frequently asked questions

What is the hex code for Gray?

Gray is #808080 in HEX, rgb(128, 128, 128) in RGB and hsl(0, 0%, 50%) in HSL.

Can I use "gray" directly in CSS?

Yes. "gray" is one of the 148 standard CSS named colors, so color: gray; works in every browser.

Is Gray readable on white?

The contrast ratio of Gray on white is 3.95:1 (WCAG AA large text only). On black it is 5.32:1 (AA).

What is the complementary color of Gray?

The complementary color (opposite on the color wheel) is #808080.

Similar colors

Convert any color with the Color Converter, generate palettes with the Random Color Generator, or browse all 148 CSS color names.