Tailwind CSS v4 default palette
Tailwind neutral-300: #D4D4D4
In Tailwind CSS v4, neutral-300 is defined as --color-neutral-300: oklch(87% 0 none), which is #D4D4D4 in hex and rgb(212, 212, 212): a very light neutral gray. In Tailwind v3, neutral-300 was #D4D4D4.
In OKLCH, neutral-300 has a lightness of 87.0% and zero chroma: a gray with no hue at all.
The value fits inside sRGB, so the hex #D4D4D4 represents it without loss on any screen.
In v3, neutral-300 was #D4D4D4. The v4 value is ΔE OK 0.0 away, below the point where most people can tell them apart.
Tailwind neutral is a true gray: its OKLCH chroma is zero in every shade, so it has no hue at all.
Color codes for neutral-300
| Tailwind v4 token | --color-neutral-300 |
|---|---|
| OKLCH (source value) | oklch(87% 0 none) |
| HEX | #D4D4D4 |
| RGB | rgb(212, 212, 212) |
| HSL | hsl(0, 0%, 83%) |
| HWB | hwb(0 83% 17%) |
| CMYK (naive, no ICC profile) | cmyk(0%, 0%, 0%, 17%) |
| Decimal | 13,948,116 |
| Tailwind v3 hex | #D4D4D4 |
| Utility classes | bg-neutral-300, text-neutral-300, border-neutral-300 |
Tailwind neutral scale
Contrast and accessibility
On neutral-300, black text has a contrast ratio of 14.16:1 and passes AAA at any text size; white text reaches 1.48: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 neutral-300 | 14.16:1 | Pass | Pass | Pass | Pass | 81.0 |
| White text on neutral-300 | 1.48:1 | Fail | Fail | Fail | Fail | −25.8 |
| Neutral-300 text on white | 1.48:1 | Fail | Fail | Fail | Fail | 22.8 |
| Neutral-300 text on black | 14.16:1 | Pass | Pass | Pass | Pass | −80.5 |
Tints and shades
Each step mixes var(--color-neutral-300) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-neutral-300), white 25%) in CSS.
Tints (mixed with white)
- 5%
#d6d6d6 - 15%
#dadada - 25%
#dfdfdf - 35%
#e3e3e3 - 45%
#e7e7e7 - 55%
#ececec - 65%
#f0f0f0 - 75%
#f4f4f4 - 85%
#f9f9f9 - 95%
#fdfdfd
Shades (mixed with black)
- 5%
#c9c9c9 - 15%
#b4b4b4 - 25%
#9f9f9f - 35%
#8a8a8a - 45%
#757575 - 55%
#5f5f5f - 65%
#4a4a4a - 75%
#353535 - 85%
#202020 - 95%
#0b0b0b
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, neutral-300's complementary color is #D4D4D4 (close to lightgray), its analogous colors are #D4D4D4 and #D4D4D4, and its triadic partners are #D4D4D4 and #D4D4D4. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #d4d4d4 |
| Analogous | −30°, +30° | #d4d4d4#d4d4d4 |
| Triadic | +120°, +240° | #d4d4d4#d4d4d4 |
| Split-complementary | +150°, +210° | #d4d4d4#d4d4d4 |
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 neutral-300 is close to neutral: its OKLCH chroma is only 0.000, so its temperature comes from context. It has no perceptible hue.
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-neutral-300 text-black">...</div>
<p class="text-neutral-300 border-neutral-300">...</p>.element {
color: var(--color-neutral-300);
background-color: oklch(87% 0 none);
border-color: #d4d4d4;
outline-color: rgb(212 212 212);
}import SwiftUI
extension Color {
static let neutral300 = Color(red: 0.831, green: 0.831, blue: 0.831)
}import androidx.compose.ui.graphics.Color
val Neutral300 = Color(0xFFD4D4D4)import 'package:flutter/material.dart';
const neutral300 = Color(0xFFD4D4D4);<!-- res/values/colors.xml -->
<color name="neutral_300">#D4D4D4</color>Frequently asked questions
- What is the hex code for Tailwind neutral-300?
- In Tailwind CSS v4, neutral-300 is oklch(87% 0 none), which converts to #D4D4D4 (rgb(212, 212, 212)) in sRGB. In Tailwind v3 the same name was #D4D4D4.
- What is the difference between neutral-300 in Tailwind v3 and v4?
- v3 used the hex #D4D4D4; v4 redefined the palette in OKLCH as oklch(87% 0 none). In v3, neutral-300 was #D4D4D4. The v4 value is ΔE OK 0.0 away, below the point where most people can tell them apart.
- How do I use neutral-300 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-neutral-300). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on neutral-300?
- White text on neutral-300 has a contrast ratio of 1.48:1, which fails AA even for large text under WCAG 2.2. Black text reaches 14.16:1 and passes both AA and AAA. In APCA terms that is Lc −25.8 for white and Lc 81.0 for black.
- Which CSS named color is closest to neutral-300?
- The closest is lightgray (#D3D3D3) at ΔE OK 0.3, followed by gainsboro and powderblue.
Last reviewed by Arielton Oberek.