#808080

Gray — Color Codes & Palette

#808080  ·  rgb(128, 128, 128)  ·  hsl(0, 0%, 50%)

Color Codes

Format Value
HEX #808080
RGB rgb(128, 128, 128)
HSL hsl(0, 0%, 50%)

Shades of Gray

#737373#666666#595959#4D4D4D#404040#333333#262626#1A1A1A

Tints of Gray

#8C8C8C#999999#A6A6A6#B3B3B3#BFBFBF#CCCCCC#D9D9D9#E6E6E6

Color Pairings & Harmony

Complementary
#808080
Analogous +30°
#808080
Analogous −30°
#808080
Triadic +120°
#808080
Triadic −120°
#808080

Contrast & Accessibility (WCAG 2.1)

vs. White (#FFFFFF)
3.95:1 — AA pass for large text only
vs. Black (#000000)
5.32:1 — AA pass for normal text

CSS Snippet

.element {
  color: #808080;
}

.element-bg {
  background-color: #808080;
  color: #000000;
}

.element-border {
  border: 2px solid #808080;
}

About Gray

Gray is a medium color with very low saturation (nearly achromatic), defined by the hex code #808080. Its exact color model values are rgb(128, 128, 128) in RGB and hsl(0, 0%, 50%) in HSL (hue 0°, saturation 0%, lightness 50%). On a white background the contrast ratio is 3.95:1 — AA pass for large text only, and on black it is 5.32:1 — AA pass for normal text. Use Gray for UI elements, backgrounds, text, borders, or decorative accents. The shades section below shows progressively darker variations, while the tints strip shows progressively lighter versions — both useful for building a tonal palette. The harmony swatches provide complementary, analogous, and triadic pairings based on the HSL hue wheel.

Want to explore this color interactively, generate palettes, or convert between color formats? The DevArbor Color Picker has you covered.

Open the Color Picker →

Frequently Asked Questions

What is the RGB value of Gray?
The RGB value of Gray (#808080) is rgb(128, 128, 128). Red = rgb(128, 128, 128), representing the amounts of red, green, and blue light on a 0–255 scale.
Is Gray accessible on a white background?
The contrast ratio of Gray on white (#FFFFFF) is 3.95:1 — AA pass for large text only. On black (#000000) the contrast ratio is 5.32:1 — AA pass for normal text. WCAG 2.1 requires 4.5:1 for AA (normal text) and 7:1 for AAA.
What colors pair well with Gray?
Based on color theory, Gray (hsl(0, 0%, 50%)) pairs well with its complementary, analogous, and triadic hues. See the harmony swatches above for the exact hex values of each pairing type.