Gray Color — HEX, RGB, HSL & CMYK Codes

#808080
Format Value
HEX #808080
RGB rgb(128, 128, 128)
HSL hsl(0, 0%, 50.2%)
CMYK cmyk(0%, 0%, 0%, 49.8%)
HSV hsv(0, 0%, 50.2%)

gray color harmonies

Tints & shades of gray

Tints (lighter)

#8c8c8c #979797 #a3a3a3 #aeaeae #bababa #c5c5c5 #d1d1d1 #dcdcdc #e8e8e8 #f3f3f3

Shades (darker)

#747474 #696969 #5d5d5d #515151 #464646 #3a3a3a #2f2f2f #232323 #171717 #0c0c0c

Contrast & accessibility

The quick brown fox

On white · 3.95:1 · AA Large

The quick brown fox

On black · 5.32:1 · AA

Recommended text color: #000000

Use gray in code

CSS color: #808080;
SCSS $color: #808080;
Tailwind bg-[#808080]
Swift UIColor(red: 0.502, green: 0.502, blue: 0.502, alpha: 1)
Android Color.parseColor("#808080")
Flutter Color(0xFF808080)

Colors similar to gray

Browse all Gray & neutral colors →

What is the HEX code for gray?

The CSS color gray in HEX format is #808080. Use this value directly in CSS, SVG, and most design tools.

How do I use gray in CSS?

To apply gray in CSS:

  • Text color: color: #808080;
  • Background: background-color: #808080;
  • Border: border-color: #808080;

What are all the color format values for gray?

FormatValue
HEX#808080
RGBrgb(128, 128, 128)
HSLhsl(0, 0%, 50.2%)
CMYKcmyk(0%, 0%, 0%, 49.8%)

How do I convert gray to HEX?

Select gray from the color name list in our color converter. The HEX value — #808080 — appears instantly alongside HEX, RGB, HSL and CMYK.

What color family does gray belong to?

gray belongs to the neutral (gray) color family. It is a medium, muted color with HSL values: hue 0°, saturation 0%, lightness 50.2%.

How do I create lighter and darker shades of gray?

Lighter variant (lightness 65.2%): #a6a6a6. Darker variant (lightness 35.2%): #5a5a5a. These values are computed by adjusting HSL lightness ±15% while keeping the same hue and saturation.

What is HEX used for?

HEX color codes are used in CSS, HTML and design tools. They encode red, green and blue as two hexadecimal digits each (00–FF), forming a compact 6-character code like #ff0000.