Skip to content

Tailwind CSS v4 default palette

Tailwind neutral-400: #A1A1A1

In Tailwind CSS v4, neutral-400 is defined as --color-neutral-400: oklch(70.8% 0 none), which is #A1A1A1 in hex and rgb(161, 161, 161): a light neutral gray. In Tailwind v3, neutral-400 was #A3A3A3.

neutral-400#A1A1A1

In OKLCH, neutral-400 has a lightness of 70.8% and zero chroma: a gray with no hue at all.

The value fits inside sRGB, so the hex #A1A1A1 represents it without loss on any screen.

In v3, neutral-400 was #A3A3A3. The v4 value is ΔE OK 0.7 away, below the point where most people can tell them apart; v4 is darker.

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-400

Color codes for neutral-400
Tailwind v4 token--color-neutral-400
OKLCH (source value)oklch(70.8% 0 none)
HEX#A1A1A1
RGBrgb(161, 161, 161)
HSLhsl(0, 0%, 63%)
HWBhwb(0 63% 37%)
CMYK (naive, no ICC profile)cmyk(0%, 0%, 0%, 37%)
Decimal10,592,673
Tailwind v3 hex#A3A3A3
Utility classesbg-neutral-400, text-neutral-400, border-neutral-400

Tailwind neutral scale

Contrast and accessibility

On neutral-400, black text has a contrast ratio of 8.12:1 and passes AAA at any text size; white text reaches 2.58: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-4008.12:1PassPassPassPass53.5
White text on neutral-4002.58:1FailFailFailFail−55.7
Neutral-400 text on white2.58:1FailFailFailFail50.5
Neutral-400 text on black8.12:1PassPassPassPass−51.4

Tints and shades

Each step mixes var(--color-neutral-400) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-neutral-400), white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #a6a6a6
  2. 15%
    #afafaf
  3. 25%
    #b9b9b9
  4. 35%
    #c2c2c2
  5. 45%
    #cbcbcb
  6. 55%
    #d5d5d5
  7. 65%
    #dedede
  8. 75%
    #e8e8e8
  9. 85%
    #f1f1f1
  10. 95%
    #fafafa

Shades (mixed with black)

  1. 5%
    #999999
  2. 15%
    #898989
  3. 25%
    #797979
  4. 35%
    #696969
  5. 45%
    #595959
  6. 55%
    #484848
  7. 65%
    #383838
  8. 75%
    #282828
  9. 85%
    #181818
  10. 95%
    #080808

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, neutral-400's complementary color is #A1A1A1 (close to darkgray), its analogous colors are #A1A1A1 and #A1A1A1, and its triadic partners are #A1A1A1 and #A1A1A1. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#a1a1a1
Analogous−30°, +30°#a1a1a1#a1a1a1
Triadic+120°, +240°#a1a1a1#a1a1a1
Split-complementary+150°, +210°#a1a1a1#a1a1a1

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-400 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
darkgray#a9a9a92.7
rosybrown#bc8f8f5.7
cadetblue#5f9ea08.2

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
stone-400#a6a09b1.0
taupe-400#aba09c1.5
zinc-400#9f9fa91.5

Code snippets

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

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

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

const neutral400 = Color(0xFFA1A1A1);
Android XML
<!-- res/values/colors.xml -->
<color name="neutral_400">#A1A1A1</color>

Frequently asked questions

What is the hex code for Tailwind neutral-400?
In Tailwind CSS v4, neutral-400 is oklch(70.8% 0 none), which converts to #A1A1A1 (rgb(161, 161, 161)) in sRGB. In Tailwind v3 the same name was #A3A3A3.
What is the difference between neutral-400 in Tailwind v3 and v4?
v3 used the hex #A3A3A3; v4 redefined the palette in OKLCH as oklch(70.8% 0 none). In v3, neutral-400 was #A3A3A3. The v4 value is ΔE OK 0.7 away, below the point where most people can tell them apart; v4 is darker.
How do I use neutral-400 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-neutral-400). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on neutral-400?
White text on neutral-400 has a contrast ratio of 2.58:1, which fails AA even for large text under WCAG 2.2. Black text reaches 8.12:1 and passes both AA and AAA. In APCA terms that is Lc −55.7 for white and Lc 53.5 for black.
Which CSS named color is closest to neutral-400?
The closest is darkgray (#A9A9A9) at ΔE OK 2.7, followed by rosybrown and cadetblue.

Last reviewed by Arielton Oberek.