Gray #808080
Gray is one of the named colours in CSS, written gray or grey. Black text reaches 5.32:1 on it, enough for body text.
Try on walls Preview on a website
Colour codes
| CSS keyword | gray or grey |
|---|---|
| HEX | #808080 |
| RGB | rgb(128 128 128) |
| HSL | hsl(0 0% 50%) |
| OKLCH | oklch(60.0% 0.000 0) |
| White text | 3.95:1 · body text AA Fail |
| Black text | 5.32:1 · body text AA Pass |
Colours that go with Gray
The closest colour in Sanzo Wada's A Dictionary of Color Combinations is Andover Green (#6D7E77), close. These are the colours Wada paired it with, ranked by their contrast with Gray itself.
| Colour | HEX | Contrast with Gray | Body text AA |
|---|---|---|---|
| Turquoise Green | #B5DECC | 2.69:1 | Fail |
| Light Green Yellow | #C7D14F | 2.38:1 | Fail |
| Light Brown Drab | #B59392 | 1.42:1 | Fail |
| Antwarp Blue | #007190 | 1.41:1 | Fail |
| Rosolanc Purple | #B73F74 | 1.34:1 | Fail |
| Vinaceous Tawny | #C56127 | 1.04:1 | Fail |
Palettes with Andover Green
Shades and tints of Gray
Nine lightness steps in OKLCH that keep the hue of Gray. Chroma is reduced only where sRGB cannot show it.
- 100#F5F5F5
- 200#E4E4E4
- 300#CECECE
- 400#B1B1B1
- 500#929292
- 600#717171
- 700#555555
- 800#3A3A3A
- 900#222222
:root {
--gray-100: #F5F5F5;
--gray-200: #E4E4E4;
--gray-300: #CECECE;
--gray-400: #B1B1B1;
--gray-500: #929292;
--gray-600: #717171;
--gray-700: #555555;
--gray-800: #3A3A3A;
--gray-900: #222222;
}
Text that keeps Gray on screen
Text #000000 on #808080 reaches 5.32:1, which passes WCAG AA for body text. Check it on a dashboard