Skip to content

Tailwind CSS v4 default palette

Tailwind zinc-900: #18181B

In Tailwind CSS v4, zinc-900 is defined as --color-zinc-900: oklch(21% 0.006 285.885), which is #18181B in hex and rgb(24, 24, 27): a very dark gray with a faint blue tint. In Tailwind v3, zinc-900 was #18181B.

zinc-900#18181B

In OKLCH, zinc-900 has a lightness of 21.0%, chroma 0.006 and hue 285.9°.

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

In v3, zinc-900 was #18181B. The v4 value is ΔE OK 0.0 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-900

Color codes for zinc-900
Tailwind v4 token--color-zinc-900
OKLCH (source value)oklch(21% 0.006 285.885)
HEX#18181B
RGBrgb(24, 24, 27)
HSLhsl(240, 6%, 10%)
HWBhwb(240 9% 89%)
CMYK (naive, no ICC profile)cmyk(11%, 11%, 0%, 89%)
Decimal1,579,035
Tailwind v3 hex#18181B
Utility classesbg-zinc-900, text-zinc-900, border-zinc-900

Tailwind zinc scale

Contrast and accessibility

On zinc-900, white text has a contrast ratio of 17.71:1 and passes AAA at any text size; black text reaches 1.18: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-9001.18:1FailFailFailFail0.0
White text on zinc-90017.71:1PassPassPassPass−106.7
Zinc-900 text on white17.71:1PassPassPassPass104.5
Zinc-900 text on black1.18:1FailFailFailFail0.0

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #242426
  2. 15%
    #3b3b3d
  3. 25%
    #525254
  4. 35%
    #69696b
  5. 45%
    #808082
  6. 55%
    #979798
  7. 65%
    #aeaeaf
  8. 75%
    #c5c5c6
  9. 85%
    #dcdcdd
  10. 95%
    #f3f3f4

Shades (mixed with black)

  1. 5%
    #17171a
  2. 15%
    #141417
  3. 25%
    #121214
  4. 35%
    #101012
  5. 45%
    #0d0d0f
  6. 55%
    #0b0b0c
  7. 65%
    #080809
  8. 75%
    #060607
  9. 85%
    #040404
  10. 95%
    #010101

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, zinc-900's complementary color is #191815 (close to midnightblue), its analogous colors are #16181B and #19171A, and its triadic partners are #1B1716 and #161918. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#191815
Analogous−30°, +30°#16181b#19171a
Triadic+120°, +240°#1b1716#161918
Split-complementary+150°, +210°#1a1815#171916

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-900 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.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
midnightblue#19197015.8
navy#00008019.2
darkslategray#2f4f4f19.7

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
neutral-900#1717170.8
mist-900#161b1d1.1
stone-900#1c19171.2

Code snippets

Tailwind CSS
<div class="bg-zinc-900 text-white">...</div>
<p class="text-zinc-900 border-zinc-900">...</p>
CSS
.element {
  color: var(--color-zinc-900);
  background-color: oklch(21% 0.006 285.885);
  border-color: #18181b;
  outline-color: rgb(24 24 27);
}
SwiftUI
import SwiftUI

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

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

const zinc900 = Color(0xFF18181B);
Android XML
<!-- res/values/colors.xml -->
<color name="zinc_900">#18181B</color>

Frequently asked questions

What is the hex code for Tailwind zinc-900?
In Tailwind CSS v4, zinc-900 is oklch(21% 0.006 285.885), which converts to #18181B (rgb(24, 24, 27)) in sRGB. In Tailwind v3 the same name was #18181B.
What is the difference between zinc-900 in Tailwind v3 and v4?
v3 used the hex #18181B; v4 redefined the palette in OKLCH as oklch(21% 0.006 285.885). In v3, zinc-900 was #18181B. The v4 value is ΔE OK 0.0 away, below the point where most people can tell them apart.
How do I use zinc-900 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-zinc-900). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on zinc-900?
White text on zinc-900 has a contrast ratio of 17.71:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 1.18:1 and fails AA even for large text. In APCA terms that is Lc −106.7 for white and Lc 0.0 for black.
Which CSS named color is closest to zinc-900?
The closest is midnightblue (#191970) at ΔE OK 15.8, followed by navy and darkslategray.

Last reviewed by Arielton Oberek.