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.
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
| Tailwind v4 token | --color-zinc-900 |
|---|---|
| OKLCH (source value) | oklch(21% 0.006 285.885) |
| HEX | #18181B |
| RGB | rgb(24, 24, 27) |
| HSL | hsl(240, 6%, 10%) |
| HWB | hwb(240 9% 89%) |
| CMYK (naive, no ICC profile) | cmyk(11%, 11%, 0%, 89%) |
| Decimal | 1,579,035 |
| Tailwind v3 hex | #18181B |
| Utility classes | bg-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.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on zinc-900 | 1.18:1 | Fail | Fail | Fail | Fail | 0.0 |
| White text on zinc-900 | 17.71:1 | Pass | Pass | Pass | Pass | −106.7 |
| Zinc-900 text on white | 17.71:1 | Pass | Pass | Pass | Pass | 104.5 |
| Zinc-900 text on black | 1.18:1 | Fail | Fail | Fail | Fail | 0.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)
- 5%
#242426 - 15%
#3b3b3d - 25%
#525254 - 35%
#69696b - 45%
#808082 - 55%
#979798 - 65%
#aeaeaf - 75%
#c5c5c6 - 85%
#dcdcdd - 95%
#f3f3f4
Shades (mixed with black)
- 5%
#17171a - 15%
#141417 - 25%
#121214 - 35%
#101012 - 45%
#0d0d0f - 55%
#0b0b0c - 65%
#080809 - 75%
#060607 - 85%
#040404 - 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.
| Harmony | Rotation | Color |
|---|---|---|
| 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
| Color | HEX | ΔE OK |
|---|---|---|
| midnightblue | #191970 | 15.8 |
| navy | #000080 | 19.2 |
| darkslategray | #2f4f4f | 19.7 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| neutral-900 | #171717 | 0.8 |
| mist-900 | #161b1d | 1.1 |
| stone-900 | #1c1917 | 1.2 |
Code snippets
<div class="bg-zinc-900 text-white">...</div>
<p class="text-zinc-900 border-zinc-900">...</p>.element {
color: var(--color-zinc-900);
background-color: oklch(21% 0.006 285.885);
border-color: #18181b;
outline-color: rgb(24 24 27);
}import SwiftUI
extension Color {
static let zinc900 = Color(red: 0.094, green: 0.094, blue: 0.106)
}import androidx.compose.ui.graphics.Color
val Zinc900 = Color(0xFF18181B)import 'package:flutter/material.dart';
const zinc900 = Color(0xFF18181B);<!-- 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.