A medium gray, black text passes AA
What color is darkgray?
The CSS named color darkgray is #a9a9a9, or rgb(169 169 169): a medium gray in plain words. Black text on it reaches 8.94:1, passing WCAG AAA, and Recolor (recolor.page) can put it on a real page.
Last updated
| Format | Value |
|---|---|
| Keyword | darkgray, also darkgrey |
| Hex | #a9a9a9 |
| RGB | rgb(169 169 169) |
| HSL | hsl(0 0% 66%) |
| OKLCH | oklch(73.5% 0.000 none) |
| Nearest Tailwind color | mist-400 #9ca8ab, 0.019 away in OKLab |
| White text | 2.35:1: AA fails, AAA fails, large text fails |
| Black text | 8.94:1: AA passes, AAA passes, large text passes |
About darkgray
Measured in OKLCH, darkgray comes out at lightness 73.5%, chroma 0.000 and no hue: a medium gray. Its other spelling, darkgrey, is the same color: the named color table of CSS lists both. CSS Color 4 itself points out that darkgray is lighter than gray: in OKLCH lightness, 73.5% against 60.0%.
Its lightness is 66% in HSL and 73.5% in OKLCH, 7 points apart; only the second tracks how light it looks. No CSS keyword matches it; rosybrown (#bc8f8f) is the nearest, 0.069 away in OKLab, a clear step off.
Black on darkgray reads at 8.94:1, enough for AAA body text; white reaches 2.35:1 and should stay off it. Its neighbors in the hue-sorted list of names are silver and gray.
The closest Tailwind 4.3.3 color is mist-400, 0.019 away in OKLab, so bg-mist-400 comes very close; bg-[#a9a9a9] gives the color itself.
Tints and shades
- #f0f0f0
- #e2e2e2
- #d3d3d3
- #c5c5c5
- #b7b7b7
- #a9a9a9
- #848484
- #606060
- #3f3f3f
- #202020
- #060606
From light to dark: 5 toward white and 5 toward black, mixed in OKLCH a sixth of the way at a time with the hue kept. A step that would repeat its neighbor is left out.
A palette around it
- #a9a9a9
- #007364
- #f8d1c5
- #25190d
- #0095d5
Around darkgray as swatch 1, Recolor's generator made a free palette, hues spread around the wheel: #007364, #f8d1c5, #25190d, #0095d5, drawn from a seed fixed by its hex. Open it in Recolor.
Using darkgray
As a text color, darkgray on a black page gives the same 8.94:1.
.notice {
background-color: darkgray; /* #a9a9a9 */
color: black; /* 8.94:1 */
}Common questions
Does white text pass WCAG AA on darkgray?
No. White text measures 2.35:1 on darkgray, under AA's 4.5:1; black text measures 8.94:1 and passes.
Can darkgray be written in OKLCH?
Yes: oklch(73.5% 0.000 none), computed from #a9a9a9. A named color is an sRGB color, so its OKLCH value converts back to the same hex.
Is there a named color close to darkgray?
No. The nearest, rosybrown (#bc8f8f), is 0.069 away in OKLab, a different color.