A very dark gray, white text passes AA
Tailwind neutral-900
The hex code of Tailwind neutral-900 is #171717 (rgb(23 23 23)), from its Tailwind CSS 4.3.3 value oklch(20.5% 0 none). White text on it reaches 17.93:1, passing WCAG AAA; below, Recolor (recolor.page) puts it on a page.
Last updated
--color-neutral-900), converted with Recolor's color code, October 9, 2026| Format | Value |
|---|---|
| OKLCH, as Tailwind writes it | oklch(20.5% 0 none) |
| Hex | #171717 |
| RGB | rgb(23 23 23) |
| HSL | hsl(0 0% 9%) |
| CSS variable | var(--color-neutral-900) |
| Nearest CSS name | midnightblue #191970, 0.166 away in OKLab |
| White text | 17.93:1: AA passes, AAA passes, large text passes |
| Black text | 1.17:1: AA fails, AAA fails, large text fails |
About neutral-900
Read as numbers, neutral-900 is lightness 20.5%, chroma 0.000 and no hue; read by eye, it is a very dark gray. Its neighbors on the neutral scale are neutral-800, 6.4 points lighter, and neutral-950, 6.0 points darker.
Its lightness is 9% in HSL and 20.5% in OKLCH, 11 points apart; only the second tracks how light it looks. No gamut mapping is needed here: oklch(20.5% 0 none) sits inside sRGB and #171717 matches it.
White on neutral-900 reads at 17.93:1, enough for AAA body text; black reaches 1.17:1 and should stay off it. On the neutral scale white text works from neutral-500 to neutral-950; neutral-900 has 4 shades of margin.
CSS has no keyword in its neighborhood; midnightblue (#191970) is the nearest, a long 0.166 away in OKLab.
Tints and shades
- #d3d3d3
- #a9a9a9
- #818181
- #5b5b5b
- #373737
- #171717
- #0f0f0f
- #080808
- #040404
- #010101
From light to dark: 5 toward white and 4 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
- #171717
- #f2b2bc
- #824e00
- #c4edf7
- #538b9b
Around neutral-900 as swatch 1, Recolor's generator made a split-complementary palette, built on the two hues beside its opposite: #f2b2bc, #824e00, #c4edf7, #538b9b, drawn from a seed fixed by its hex. Open it in Recolor.
Using neutral-900
Pair it with text-white, 17.93:1; neutral-900 as text on a white page measures the same ratio. In CSS it is var(--color-neutral-900).
<a class="bg-neutral-900 text-white" href="/start">Get started</a>
<p class="text-neutral-900">Text in neutral-900</p>Common questions
Does white text pass WCAG AA on Tailwind neutral-900?
Yes. White text measures 17.93:1 on neutral-900, above the 4.5:1 that WCAG AA asks of body text, and above AAA's 7:1 too.
Is Tailwind neutral-900 defined in OKLCH?
Yes. Tailwind CSS 4.3.3 defines it as --color-neutral-900: oklch(20.5% 0 none); #171717 is its conversion to sRGB.
Is there a CSS named color for Tailwind neutral-900?
No. The nearest CSS named color is midnightblue (#191970), 0.166 away in OKLab.
Sources
- Tailwind CSS: Colors tailwindcss.com
- WCAG 2.2: Contrast (Minimum) w3.org