Skip to content

Tailwind CSS v4 default palette

Tailwind zinc-400: #9F9FA9

In Tailwind CSS v4, zinc-400 is defined as --color-zinc-400: oklch(70.5% 0.015 286.067), which is #9F9FA9 in hex and rgb(159, 159, 169): a light, grayish blue. In Tailwind v3, zinc-400 was #A1A1AA.

zinc-400#9F9FA9

In OKLCH, zinc-400 has a lightness of 70.5%, chroma 0.015 and hue 286.1°.

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

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

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

Color codes for zinc-400
Tailwind v4 token--color-zinc-400
OKLCH (source value)oklch(70.5% 0.015 286.067)
HEX#9F9FA9
RGBrgb(159, 159, 169)
HSLhsl(240, 5%, 64%)
HWBhwb(240 62% 34%)
CMYK (naive, no ICC profile)cmyk(6%, 6%, 0%, 34%)
Decimal10,461,097
Tailwind v3 hex#A1A1AA
Utility classesbg-zinc-400, text-zinc-400, border-zinc-400

Tailwind zinc scale

Contrast and accessibility

On zinc-400, black text has a contrast ratio of 8.00:1 and passes AAA at any text size; white text reaches 2.62: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 zinc-4008.00:1PassPassPassPass52.8
White text on zinc-4002.62:1FailFailFailFail−56.3
Zinc-400 text on white2.62:1FailFailFailFail51.2
Zinc-400 text on black8.00:1PassPassPassPass−50.7

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #a4a4ad
  2. 15%
    #adadb6
  3. 25%
    #b7b7bf
  4. 35%
    #c1c1c7
  5. 45%
    #cacad0
  6. 55%
    #d4d4d8
  7. 65%
    #dddde1
  8. 75%
    #e7e7ea
  9. 85%
    #f1f1f2
  10. 95%
    #fafafb

Shades (mixed with black)

  1. 5%
    #9797a1
  2. 15%
    #878790
  3. 25%
    #77777f
  4. 35%
    #67676e
  5. 45%
    #57575d
  6. 55%
    #48484c
  7. 65%
    #38383b
  8. 75%
    #28282a
  9. 85%
    #181819
  10. 95%
    #080808

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, zinc-400's complementary color is #A1A196 (close to darkgray), its analogous colors are #9AA1A9 and #A49DA6, and its triadic partners are #A89D98 and #98A39E. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#a1a196
Analogous−30°, +30°#9aa1a9#a49da6
Triadic+120°, +240°#a89d98#98a39e
Split-complementary+150°, +210°#a59f96#9ca299

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-400 is close to neutral: its OKLCH chroma is only 0.015, 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.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
darkgray#a9a9a93.3
rosybrown#bc8f8f5.9
cadetblue#5f9ea08.1

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
gray-400#99a1af1.1
mauve-400#a89ea91.3
neutral-400#a1a1a11.5

Code snippets

Tailwind CSS
<div class="bg-zinc-400 text-black">...</div>
<p class="text-zinc-400 border-zinc-400">...</p>
CSS
.element {
  color: var(--color-zinc-400);
  background-color: oklch(70.5% 0.015 286.067);
  border-color: #9f9fa9;
  outline-color: rgb(159 159 169);
}
SwiftUI
import SwiftUI

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

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

const zinc400 = Color(0xFF9F9FA9);
Android XML
<!-- res/values/colors.xml -->
<color name="zinc_400">#9F9FA9</color>

Frequently asked questions

What is the hex code for Tailwind zinc-400?
In Tailwind CSS v4, zinc-400 is oklch(70.5% 0.015 286.067), which converts to #9F9FA9 (rgb(159, 159, 169)) in sRGB. In Tailwind v3 the same name was #A1A1AA.
What is the difference between zinc-400 in Tailwind v3 and v4?
v3 used the hex #A1A1AA; v4 redefined the palette in OKLCH as oklch(70.5% 0.015 286.067). In v3, zinc-400 was #A1A1AA. 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 zinc-400 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-zinc-400). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on zinc-400?
White text on zinc-400 has a contrast ratio of 2.62:1, which fails AA even for large text under WCAG 2.2. Black text reaches 8.00:1 and passes both AA and AAA. In APCA terms that is Lc −56.3 for white and Lc 52.8 for black.
Which CSS named color is closest to zinc-400?
The closest is darkgray (#A9A9A9) at ΔE OK 3.3, followed by rosybrown and cadetblue.

Last reviewed by Arielton Oberek.