A grayish very dark blue, white text passes AA
Tailwind slate-900
The hex code of Tailwind slate-900 is #0f172b (rgb(15 23 43)), from its Tailwind CSS 4.3.3 value oklch(20.8% 0.042 265.755). White text on it reaches 17.83:1, passing WCAG AAA; below, Recolor (recolor.page) puts it on a page.
Last updated
--color-slate-900), converted with Recolor's color code, October 9, 2026| Format | Value |
|---|---|
| OKLCH, as Tailwind writes it | oklch(20.8% 0.042 265.755) |
| Hex | #0f172b |
| RGB | rgb(15 23 43) |
| HSL | hsl(223 48% 11%) |
| CSS variable | var(--color-slate-900) |
| Nearest CSS name | midnightblue #191970, 0.130 away in OKLab |
| White text | 17.83:1: AA passes, AAA passes, large text passes |
| Black text | 1.18:1: AA fails, AAA fails, large text fails |
About slate-900
Read as numbers, slate-900 is lightness 20.8%, chroma 0.042 and hue 265.8 degrees; read by eye, it is a grayish very dark blue. Its neighbors on the slate scale are slate-800, 7.1 points lighter, and slate-950, 7.9 points darker.
HSL calls its lightness 11%, OKLCH 20.8%: 9 points between a formula and a measure of what the eye sees. No gamut mapping is needed here: oklch(20.8% 0.042 265.755) sits inside sRGB and #0f172b matches it.
White on slate-900 reads at 17.83:1, enough for AAA body text; black reaches 1.18:1 and should stay off it. White text passes on every slate shade from slate-500 down, so slate-900 is 4 shades past the line.
No CSS named color comes near it: the closest, midnightblue (#191970), is 0.130 away in OKLab.
Tints and shades
- #d1d3d8
- #a5aab3
- #7c818e
- #545b6c
- #30384a
- #0f172b
- #090f1f
- #050814
- #02040a
- #010103
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
- #0f172b
- #517ce7
- #e2e8fd
- #405a94
- #96b0f6
Around slate-900 as swatch 1, Recolor's generator made a monochromatic palette, one hue in five lightnesses: #517ce7, #e2e8fd, #405a94, #96b0f6, drawn from a seed fixed by its hex. Open it in Recolor.
Using slate-900
Pair it with text-white, 17.83:1; slate-900 as text on a white page measures the same ratio. In CSS it is var(--color-slate-900).
<a class="bg-slate-900 text-white" href="/start">Get started</a>
<p class="text-slate-900">Text in slate-900</p>Common questions
Does white text pass WCAG AA on Tailwind slate-900?
Yes. White text measures 17.83:1 on slate-900, above the 4.5:1 that WCAG AA asks of body text, and above AAA's 7:1 too.
Is Tailwind slate-900 defined in OKLCH?
Yes. Tailwind CSS 4.3.3 defines it as --color-slate-900: oklch(20.8% 0.042 265.755); #0f172b is its conversion to sRGB.
Is there a CSS named color for Tailwind slate-900?
No. The nearest CSS named color is midnightblue (#191970), 0.130 away in OKLab.
Sources
- Tailwind CSS: Colors tailwindcss.com
- WCAG 2.2: Contrast (Minimum) w3.org