#808080
gray
#808080 is a grey colour. In RGB it is 128 red, 128 green and 128 blue, which converts to a hue of 0 degrees, 0% saturation and 50% lightness. It is one of the named CSS colours, written as gray in stylesheets.
Color values
| HEX | #808080 |
|---|---|
| RGB | rgb(128, 128, 128) |
| HSL | hsl(0, 0%, 50%) |
| HSV | hsv(0, 0%, 50%) |
| CMYK | cmyk(0%, 0%, 0%, 50%) |
Contrast and accessibility
Against white the contrast ratio is 3.95:1, and against black it is 5.32:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.
| Background | Ratio | Normal text | Large text |
|---|---|---|---|
| White | 3.95:1 | Fail | AA |
| Black | 5.32:1 | AA | AAA |
Tints and shades
Lighter tints move #808080 toward white, and darker shades move it toward black.
Tints
Shades
Color harmonies
Complementary
Analogous
Triadic
Split complementary
Code
| CSS | color: #808080; |
|---|---|
| CSS rgb() | color: rgb(128 128 128); |
| Tailwind | bg-[#808080] |
| SwiftUI | Color(red: 0.502, green: 0.502, blue: 0.502) |
| Android | Color.parseColor("#808080") |