Skip to content

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.

neutral-300#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

Color codes for neutral-300
Tailwind v4 token--color-neutral-300
OKLCH (source value)oklch(87% 0 none)
HEX#D4D4D4
RGBrgb(212, 212, 212)
HSLhsl(0, 0%, 83%)
HWBhwb(0 83% 17%)
CMYK (naive, no ICC profile)cmyk(0%, 0%, 0%, 17%)
Decimal13,948,116
Tailwind v3 hex#D4D4D4
Utility classesbg-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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on neutral-30014.16:1PassPassPassPass81.0
White text on neutral-3001.48:1FailFailFailFail−25.8
Neutral-300 text on white1.48:1FailFailFailFail22.8
Neutral-300 text on black14.16:1PassPassPassPass−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)

  1. 5%
    #d6d6d6
  2. 15%
    #dadada
  3. 25%
    #dfdfdf
  4. 35%
    #e3e3e3
  5. 45%
    #e7e7e7
  6. 55%
    #ececec
  7. 65%
    #f0f0f0
  8. 75%
    #f4f4f4
  9. 85%
    #f9f9f9
  10. 95%
    #fdfdfd

Shades (mixed with black)

  1. 5%
    #c9c9c9
  2. 15%
    #b4b4b4
  3. 25%
    #9f9f9f
  4. 35%
    #8a8a8a
  5. 45%
    #757575
  6. 55%
    #5f5f5f
  7. 65%
    #4a4a4a
  8. 75%
    #353535
  9. 85%
    #202020
  10. 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.

Color harmonies
HarmonyRotationColor
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.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
lightgray#d3d3d30.3
gainsboro#dcdcdc2.4
powderblue#b0e0e65.0

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
stone-300#d6d3d10.5
zinc-300#d4d4d80.6
mist-300#d0d6d80.7

Code snippets

Tailwind CSS
<div class="bg-neutral-300 text-black">...</div>
<p class="text-neutral-300 border-neutral-300">...</p>
CSS
.element {
  color: var(--color-neutral-300);
  background-color: oklch(87% 0 none);
  border-color: #d4d4d4;
  outline-color: rgb(212 212 212);
}
SwiftUI
import SwiftUI

extension Color {
  static let neutral300 = Color(red: 0.831, green: 0.831, blue: 0.831)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Neutral300 = Color(0xFFD4D4D4)
Flutter
import 'package:flutter/material.dart';

const neutral300 = Color(0xFFD4D4D4);
Android XML
<!-- 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.