Grey color codes
| CSS name | grey |
|---|---|
| HEX | #808080 |
| RGB | rgb(128, 128, 128) |
| HSL | hsl(0, 0%, 50%) |
| CMYK | cmyk(0%, 0%, 0%, 50%) |
| Decimal | 8421504 |
Shades of Grey (darker)
#737373 · #666666 · #5A5A5A · #4D4D4D · #404040 · #333333 · #262626 · #1A1A1A · #0D0D0D
Tints of Grey (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 Grey | 3.95:1 · AA large text only |
|---|---|
| Black text on Grey | 5.32:1 · AA |
Use Grey in code
.element {
color: grey; /* or #808080 */
background-color: rgb(128 128 128 / 0.5);
}Frequently asked questions
What is the hex code for Grey?
Grey is #808080 in HEX, rgb(128, 128, 128) in RGB and hsl(0, 0%, 50%) in HSL.
Can I use "grey" directly in CSS?
Yes. "grey" is one of the 148 standard CSS named colors, so color: grey; works in every browser.
Is Grey readable on white?
The contrast ratio of Grey 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 Grey?
The complementary color (opposite on the color wheel) is #808080.
Similar colors
Slate Gray#708090Slate Grey#708090Light Slate Gray#778899Light Slate Grey#778899Dim Gray#696969Dim Grey#696969Cadet Blue#5F9EA0Dark Sea Green#8FBC8F
Convert any color with the Color Converter, generate palettes with the Random Color Generator, or browse all 148 CSS color names.