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

#0f172bslate-900
From the theme file of Tailwind CSS 4.3.3 (--color-slate-900), converted with Recolor's color code, October 9, 2026
FormatValue
OKLCH, as Tailwind writes itoklch(20.8% 0.042 265.755)
Hex#0f172b
RGBrgb(15 23 43)
HSLhsl(223 48% 11%)
CSS variablevar(--color-slate-900)
Nearest CSS namemidnightblue #191970, 0.130 away in OKLab
White text17.83:1: AA passes, AAA passes, large text passes
Black text1.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

  1. #d1d3d8
  2. #a5aab3
  3. #7c818e
  4. #545b6c
  5. #30384a
  6. #0f172b
  7. #090f1f
  8. #050814
  9. #02040a
  10. #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

  1. #0f172b
  2. #517ce7
  3. #e2e8fd
  4. #405a94
  5. #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).

HTML
<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