gray-900
#101828Tailwind CSS v4.3.3 gray-900 is oklch(21% 0.034 264.665) in OKLCH, the format Tailwind uses, and #101828 in HEX.
- Class
- OKLCH
- HEX
- RGB
- HSL
- CSS
Classes
Click to copy. Add /50 for 50% opacity, for example bg-gray-900/50.
Text on gray-900
- Aawhite17.75:1Readable · AA
- Aablack1.18:1Hard to read
- Aagray-5017:1Readable · AA
Most readable text from the gray scale: gray-50
Tailwind gray scale
Step 900 in other Tailwind colors
Questions and answers
What is the hex code of Tailwind gray-900?
gray-900 is #101828 in HEX, rgb(16 24 40) in RGB and oklch(21% 0.034 264.665) in OKLCH. Tailwind CSS v4.3.3 defines its colors in OKLCH, so the HEX value is the closest sRGB match.
Is Tailwind gray-900 accessible for text?
White text on gray-900 has a contrast ratio of 17.75:1 and black text 1.18:1. WCAG AA needs 4.5:1 for normal text and 3:1 for large text, so white text is the better choice here.
How do I use gray-900 in Tailwind CSS?
Add bg-gray-900, text-gray-900 or border-gray-900 to an element. In your own CSS use var(--color-gray-900), the CSS variable Tailwind v4 creates for every color.