Color Values
- HEX
- #D1D5DB
- RGB
- rgb(209, 213, 219)
- HSL
- hsl(216, 12%, 84%)
- OKLCH
- oklch(0.872 0.009 258)
- CMYK
- cmyk(5%, 3%, 0%, 14%)
- CSS Variable
- var(--color-gray-300)
- Tailwind Class
- bg-gray-300
Accessibility Score
Good
Based on WCAG 2.1 contrast ratios against white and black backgrounds.
On White
1.47:1
On Black
14.25:1
Tailwind Usage — All Utilities
Background
bg-gray-300Text
text-gray-300Border
border-gray-300Ring
ring-gray-300Outline
outline-gray-300Fill
fill-gray-300Stroke
stroke-gray-300From (gradient)
from-gray-300Via (gradient)
via-gray-300To (gradient)
to-gray-300Placeholder
placeholder-gray-300Caret
caret-gray-300Accent
accent-gray-300Decoration
decoration-gray-300Shadow Color
shadow-gray-300Tailwind v3 Config (extend custom color)
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
'gray-300': '#d1d5db',
},
},
},
};CSS Equivalent
/* Hex */
background-color: #D1D5DB;
/* RGB */
background-color: rgb(209, 213, 219);
/* HSL */
background-color: hsl(216, 12%, 84%);
/* OKLCH (CSS Color Level 4) */
background-color: oklch(0.872 0.009 258);
/* CSS Custom Property (Tailwind v4) */
background-color: var(--color-gray-300);
/* Gradient example */
background: linear-gradient(135deg, #f9fafb 0%, #9ca3af 100%);OKLCH — Modern Color Space
Lightness (L)
0.872
87% perceived brightness
Chroma (C)
0.009
Color intensity / saturation
Hue (H)
258°
Angle on perceptual hue wheel
oklch(0.872 0.009 258)OKLCH is a perceptually uniform color space in CSS Color Level 4. Unlike HSL, equal steps in L produce equal perceived lightness changes — making it ideal for building accessible, harmonious design system scales.
Design Recommendations
Light mid-tone accent
Shade 300 of the Gray palette
Recommended Uses
- ✓Secondary button outlines
- ✓Icon strokes on dark backgrounds
- ✓Progress bar fills
- ✓Selected state highlights
Avoid
Preview
On White
Aa Bb Cc
On Black
Aa Bb Cc
As Background
Aa Bb Cc — #D1D5DB
Similar Tailwind Colors
Perceptually close shades from other Tailwind color families.
Nearest Named Color
Tailwind Gray 300
Nearest Tailwind equivalent — #D1D5DB
Frequently Asked Questions
- What is the hex code for Tailwind Gray 300?
- Tailwind Gray 300 has the hex code #D1D5DB. Its RGB value is rgb(209, 213, 219) and its HSL value is hsl(216, 12%, 84%).
- What Tailwind utility classes use Gray 300?
- Use bg-gray-300 for backgrounds, text-gray-300 for text color, border-gray-300 for borders, and ring-gray-300 for focus rings. In Tailwind v4 the CSS variable var(--color-gray-300) is available natively.
- Is Tailwind Gray 300 WCAG accessible?
- Tailwind Gray 300 achieves a 1.47:1 contrast ratio on white (Fail) and 14.25:1 on black (AAA). Its overall accessibility score is 60/100 (Good).
- What is the OKLCH value for Tailwind Gray 300?
- Tailwind Gray 300 in OKLCH is oklch(0.872 0.009 258) — lightness 0.872, chroma 0.009, hue 258°. OKLCH is a perceptually uniform space supported natively in modern CSS via the `color()` function.
- What is Tailwind Gray 300 used for?
- At shade 300, Tailwind Gray 300 is best described as "Light mid-tone accent". Recommended uses: Secondary button outlines, Icon strokes on dark backgrounds, Progress bar fills.