A medium bluish gray, black text passes AA
Tailwind gray-400
In Tailwind CSS 4.3.3, gray-400 is defined as oklch(70.7% 0.022 261.325); in hex that is #99a1af, or rgb(153 161 175). Black text on it reaches 8.07:1, passing WCAG AAA, and Recolor (recolor.page) can show it on a real page.
Last updated
--color-gray-400), converted with Recolor's color code, October 9, 2026| Format | Value |
|---|---|
| OKLCH, as Tailwind writes it | oklch(70.7% 0.022 261.325) |
| Hex | #99a1af |
| RGB | rgb(153 161 175) |
| HSL | hsl(218 12% 64%) |
| CSS variable | var(--color-gray-400) |
| Nearest CSS name | darkgray #a9a9a9, 0.036 away in OKLab |
| White text | 2.60:1: AA fails, AAA fails, large text fails |
| Black text | 8.07:1: AA passes, AAA passes, large text passes |
About gray-400
In OKLCH, gray-400 has a lightness of 70.7%, a chroma of 0.022 and a hue of 261.3 degrees, which makes it a medium bluish gray. The step up to gray-300 is 16.5 points of lightness, and the step down to gray-500 15.6 points.
HSL calls its lightness 64%, OKLCH 70.7%: 6 points between a formula and a measure of what the eye sees. The value lies inside sRGB, the gamut of a hex code, so gray-400 converts to #99a1af without losing chroma.
For text, gray-400 wants black: 8.07:1 clears even AAA's 7:1, and white at 2.60:1 fails AA. It is the darkest gray shade that still carries black body text; gray-500 drops to 4.34:1.
Among the CSS keywords, darkgray (#a9a9a9) comes closest at 0.036 in OKLab, close enough to stand in for it in a sketch.
Tints and shades
- #edeff1
- #dcdfe4
- #cbcfd6
- #babfc9
- #a9b0bc
- #99a1af
- #777d88
- #575b64
- #383c41
- #1c1e22
- #050507
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
- #99a1af
- #764b34
- #b8edff
- #011d28
- #d5ac97
Locked as the first of five swatches, gray-400 gets #764b34, #b8edff, #011d28, #d5ac97 from Recolor's generator, a complementary palette, built on the hue opposite. The seed is its hex, so the palette stays the same. Open it in Recolor.
Using gray-400
Pair it with text-black, 8.07:1; gray-400 as text on a black page measures the same ratio. In CSS it is var(--color-gray-400).
<a class="bg-gray-400 text-black" href="/start">Get started</a>
<p class="text-gray-400">Text in gray-400</p>Common questions
Does white text pass WCAG AA on Tailwind gray-400?
No. White text measures 2.60:1 on gray-400, under AA's 4.5:1; black text measures 8.07:1 and passes. The lightest gray shade for white text is gray-500.
Is Tailwind gray-400 defined in OKLCH?
Yes. Tailwind CSS 4.3.3 defines it as --color-gray-400: oklch(70.7% 0.022 261.325); #99a1af is its conversion to sRGB.
Is there a CSS named color for Tailwind gray-400?
No. The nearest CSS named color is darkgray (#a9a9a9), 0.036 away in OKLab.
Sources
- Tailwind CSS: Colors tailwindcss.com
- WCAG 2.2: Contrast (Minimum) w3.org