gray-300
#d1d5dcTailwind CSS v4.3.3 gray-300 is oklch(87.2% 0.01 258.338) in OKLCH, the format Tailwind uses, and #d1d5dc in HEX.
- Class
- OKLCH
- HEX
- RGB
- HSL
- CSS
Classes
Click to copy. Add /50 for 50% opacity, for example bg-gray-300/50.
Text on gray-300
- Aawhite1.47:1Hard to read
- Aablack14.27:1Readable · AA
- Aagray-95013.67:1Readable · AA
Most readable text from the gray scale: gray-950
Tailwind gray scale
Step 300 in other Tailwind colors
Questions and answers
What is the hex code of Tailwind gray-300?
gray-300 is #d1d5dc in HEX, rgb(209 213 220) in RGB and oklch(87.2% 0.01 258.338) in OKLCH. Tailwind CSS v4.3.3 defines its colors in OKLCH, so the HEX value is the closest sRGB match.
Is Tailwind gray-300 accessible for text?
White text on gray-300 has a contrast ratio of 1.47:1 and black text 14.27:1. WCAG AA needs 4.5:1 for normal text and 3:1 for large text, so black text is the better choice here.
How do I use gray-300 in Tailwind CSS?
Add bg-gray-300, text-gray-300 or border-gray-300 to an element. In your own CSS use var(--color-gray-300), the CSS variable Tailwind v4 creates for every color.