A grayish very dark blue, white text passes AA
Tailwind gray-900
Tailwind gray-900 is oklch(21% 0.034 264.665) in Tailwind CSS 4.3.3, which is #101828 in hex and rgb(16 24 40). White text on it reaches 17.75:1, passing WCAG AAA. Recolor (recolor.page) shows it on a real page below.
Last updated
--color-gray-900), converted with Recolor's color code, October 9, 2026| Format | Value |
|---|---|
| OKLCH, as Tailwind writes it | oklch(21% 0.034 264.665) |
| Hex | #101828 |
| RGB | rgb(16 24 40) |
| HSL | hsl(220 43% 11%) |
| CSS variable | var(--color-gray-900) |
| Nearest CSS name | midnightblue #191970, 0.135 away in OKLab |
| White text | 17.75:1: AA passes, AAA passes, large text passes |
| Black text | 1.18:1: AA fails, AAA fails, large text fails |
About gray-900
Tailwind gray-900 is a grayish very dark blue: OKLCH lightness 21.0%, chroma 0.034, hue 264.7 degrees. On Tailwind's gray scale it sits between gray-800 at 27.8% and gray-950 at 13.0%.
Its lightness is 11% in HSL and 21.0% in OKLCH, 10 points apart; only the second tracks how light it looks. Its value fits inside sRGB, so #101828 is the same color, not an approximation.
White text on gray-900 measures 17.75:1, past the 7:1 of WCAG AAA, while black text manages only 1.18:1. On the gray scale white text works from gray-500 to gray-950; gray-900 has 4 shades of margin.
CSS has no keyword in its neighborhood; midnightblue (#191970) is the nearest, a long 0.135 away in OKLab.
Tints and shades
- #d2d4d7
- #a6aab1
- #7c828c
- #555c69
- #313847
- #101828
- #0a101d
- #050913
- #020409
- #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
- #101828
- #a0c3e3
- #445800
- #ffebf4
- #cb7081
Recolor's generator, with gray-900 locked as swatch 1 and the seed taken from its hex, drew a triadic palette, three hues a third of the wheel apart: #a0c3e3, #445800, #ffebf4, #cb7081. Open it in Recolor.
Using gray-900
Pair it with text-white, 17.75:1; gray-900 as text on a white page measures the same ratio. In CSS it is var(--color-gray-900).
<a class="bg-gray-900 text-white" href="/start">Get started</a>
<p class="text-gray-900">Text in gray-900</p>Common questions
Does white text pass WCAG AA on Tailwind gray-900?
Yes. White text measures 17.75:1 on gray-900, above the 4.5:1 that WCAG AA asks of body text, and above AAA's 7:1 too.
Is Tailwind gray-900 defined in OKLCH?
Yes. Tailwind CSS 4.3.3 defines it as --color-gray-900: oklch(21% 0.034 264.665); #101828 is its conversion to sRGB.
Is there a CSS named color for Tailwind gray-900?
No. The nearest CSS named color is midnightblue (#191970), 0.135 away in OKLab.
Sources
- Tailwind CSS: Colors tailwindcss.com
- WCAG 2.2: Contrast (Minimum) w3.org