Tailwind CSS v4 default palette
Tailwind zinc-300: #D4D4D8
In Tailwind CSS v4, zinc-300 is defined as --color-zinc-300: oklch(87.1% 0.006 286.286), which is #D4D4D8 in hex and rgb(212, 212, 216): a very light gray with a faint blue tint. In Tailwind v3, zinc-300 was #D4D4D8.
In OKLCH, zinc-300 has a lightness of 87.1%, chroma 0.006 and hue 286.3°.
The value fits inside sRGB, so the hex #D4D4D8 represents it without loss on any screen.
In v3, zinc-300 was #D4D4D8. The v4 value is ΔE OK 0.1 away, below the point where most people can tell them apart.
Tailwind zinc is a nearly neutral gray with a faint cool violet cast, sitting between the bluish gray and the hueless neutral.
Color codes for zinc-300
| Tailwind v4 token | --color-zinc-300 |
|---|---|
| OKLCH (source value) | oklch(87.1% 0.006 286.286) |
| HEX | #D4D4D8 |
| RGB | rgb(212, 212, 216) |
| HSL | hsl(240, 5%, 84%) |
| HWB | hwb(240 83% 15%) |
| CMYK (naive, no ICC profile) | cmyk(2%, 2%, 0%, 15%) |
| Decimal | 13,948,120 |
| Tailwind v3 hex | #D4D4D8 |
| Utility classes | bg-zinc-300, text-zinc-300, border-zinc-300 |
Tailwind zinc scale
Contrast and accessibility
On zinc-300, black text has a contrast ratio of 14.20:1 and passes AAA at any text size; white text reaches 1.47:1.
WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on zinc-300 | 14.20:1 | Pass | Pass | Pass | Pass | 81.1 |
| White text on zinc-300 | 1.47:1 | Fail | Fail | Fail | Fail | −25.7 |
| Zinc-300 text on white | 1.47:1 | Fail | Fail | Fail | Fail | 22.6 |
| Zinc-300 text on black | 14.20:1 | Pass | Pass | Pass | Pass | −80.7 |
Tints and shades
Each step mixes var(--color-zinc-300) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-zinc-300), white 25%) in CSS.
Tints (mixed with white)
- 5%
#d6d6da - 15%
#dadade - 25%
#dfdfe2 - 35%
#e3e3e6 - 45%
#e7e7ea - 55%
#ececed - 65%
#f0f0f1 - 75%
#f4f4f5 - 85%
#f9f9f9 - 95%
#fdfdfd
Shades (mixed with black)
- 5%
#c9c9cd - 15%
#b4b4b8 - 25%
#9f9fa2 - 35%
#8a8a8c - 45%
#757577 - 55%
#5f5f61 - 65%
#4a4a4c - 75%
#353536 - 85%
#202020 - 95%
#0b0b0b
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, zinc-300's complementary color is #D5D5D0 (close to lightgray), its analogous colors are #D2D5D8 and #D6D3D7, and its triadic partners are #D8D3D1 and #D1D6D3. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #d5d5d0 |
| Analogous | −30°, +30° | #d2d5d8#d6d3d7 |
| Triadic | +120°, +240° | #d8d3d1#d1d6d3 |
| Split-complementary | +150°, +210° | #d7d4d0#d3d5d2 |
Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.
Warm or cool?
Tailwind zinc-300 is close to neutral: its OKLCH chroma is only 0.006, so its temperature comes from context. The faint 240° hue gives it a slightly cool cast.
Nearest named and Tailwind colors
Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.
Code snippets
<div class="bg-zinc-300 text-black">...</div>
<p class="text-zinc-300 border-zinc-300">...</p>.element {
color: var(--color-zinc-300);
background-color: oklch(87.1% 0.006 286.286);
border-color: #d4d4d8;
outline-color: rgb(212 212 216);
}import SwiftUI
extension Color {
static let zinc300 = Color(red: 0.831, green: 0.831, blue: 0.847)
}import androidx.compose.ui.graphics.Color
val Zinc300 = Color(0xFFD4D4D8)import 'package:flutter/material.dart';
const zinc300 = Color(0xFFD4D4D8);<!-- res/values/colors.xml -->
<color name="zinc_300">#D4D4D8</color>Frequently asked questions
- What is the hex code for Tailwind zinc-300?
- In Tailwind CSS v4, zinc-300 is oklch(87.1% 0.006 286.286), which converts to #D4D4D8 (rgb(212, 212, 216)) in sRGB. In Tailwind v3 the same name was #D4D4D8.
- What is the difference between zinc-300 in Tailwind v3 and v4?
- v3 used the hex #D4D4D8; v4 redefined the palette in OKLCH as oklch(87.1% 0.006 286.286). In v3, zinc-300 was #D4D4D8. The v4 value is ΔE OK 0.1 away, below the point where most people can tell them apart.
- How do I use zinc-300 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-zinc-300). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on zinc-300?
- White text on zinc-300 has a contrast ratio of 1.47:1, which fails AA even for large text under WCAG 2.2. Black text reaches 14.20:1 and passes both AA and AAA. In APCA terms that is Lc −25.7 for white and Lc 81.1 for black.
- Which CSS named color is closest to zinc-300?
- The closest is lightgray (#D3D3D3) at ΔE OK 0.7, followed by gainsboro and lightblue.
Last reviewed by Arielton Oberek.