Tailwind CSS v4 default palette
Tailwind slate-900: #0F172B
In Tailwind CSS v4, slate-900 is defined as --color-slate-900: oklch(20.8% 0.042 265.755), which is #0F172B in hex and rgb(15, 23, 43): a very dark, muted blue. In Tailwind v3, slate-900 was #0F172A.
In OKLCH, slate-900 has a lightness of 20.8%, chroma 0.042 and hue 265.8°.
The value fits inside sRGB, so the hex #0F172B represents it without loss on any screen.
In v3, slate-900 was #0F172A. The v4 value is ΔE OK 0.2 away, below the point where most people can tell them apart.
Tailwind slate is the bluest of the gray scales, a cool gray that pairs well with blue and indigo accents.
Color codes for slate-900
| Tailwind v4 token | --color-slate-900 |
|---|---|
| OKLCH (source value) | oklch(20.8% 0.042 265.755) |
| HEX | #0F172B |
| RGB | rgb(15, 23, 43) |
| HSL | hsl(223, 48%, 11%) |
| HWB | hwb(223 6% 83%) |
| CMYK (naive, no ICC profile) | cmyk(65%, 47%, 0%, 83%) |
| Decimal | 988,971 |
| Tailwind v3 hex | #0F172A |
| Utility classes | bg-slate-900, text-slate-900, border-slate-900 |
Tailwind slate scale
Contrast and accessibility
On slate-900, white text has a contrast ratio of 17.83:1 and passes AAA at any text size; black text reaches 1.17: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 slate-900 | 1.17:1 | Fail | Fail | Fail | Fail | 0.0 |
| White text on slate-900 | 17.83:1 | Pass | Pass | Pass | Pass | −106.8 |
| Slate-900 text on white | 17.83:1 | Pass | Pass | Pass | Pass | 104.5 |
| Slate-900 text on black | 1.17:1 | Fail | Fail | Fail | Fail | 0.0 |
Tints and shades
Each step mixes var(--color-slate-900) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-slate-900), white 25%) in CSS.
Tints (mixed with white)
- 5%
#1b2336 - 15%
#333a4b - 25%
#4b5160 - 35%
#636875 - 45%
#7b7f8a - 55%
#9397a0 - 65%
#abaeb5 - 75%
#c3c5ca - 85%
#dbdcdf - 95%
#f3f3f4
Shades (mixed with black)
- 5%
#0e1629 - 15%
#0d1425 - 25%
#0b1120 - 35%
#0a0f1c - 45%
#080d18 - 55%
#070a13 - 65%
#05080f - 75%
#04060b - 85%
#020306 - 95%
#010102
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, slate-900's complementary color is #201600 (close to midnightblue), its analogous colors are #021A28 and #1A1329, and its triadic partners are #280F0E and #0A1D0B. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #201600 |
| Analogous | −30°, +30° | #021a28#1a1329 |
| Triadic | +120°, +240° | #280f0e#0a1d0b |
| Split-complementary | +150°, +210° | #261204#171a03 |
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 slate-900 is a cool color: its hue is 223° on the HSL wheel, in the green, blue and violet range that is conventionally called cool.
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.
Code snippets
<div class="bg-slate-900 text-white">...</div>
<p class="text-slate-900 border-slate-900">...</p>.element {
color: var(--color-slate-900);
background-color: oklch(20.8% 0.042 265.755);
border-color: #0f172b;
outline-color: rgb(15 23 43);
}import SwiftUI
extension Color {
static let slate900 = Color(red: 0.059, green: 0.090, blue: 0.169)
}import androidx.compose.ui.graphics.Color
val Slate900 = Color(0xFF0F172B)import 'package:flutter/material.dart';
const slate900 = Color(0xFF0F172B);<!-- res/values/colors.xml -->
<color name="slate_900">#0F172B</color>Frequently asked questions
- What is the hex code for Tailwind slate-900?
- In Tailwind CSS v4, slate-900 is oklch(20.8% 0.042 265.755), which converts to #0F172B (rgb(15, 23, 43)) in sRGB. In Tailwind v3 the same name was #0F172A.
- What is the difference between slate-900 in Tailwind v3 and v4?
- v3 used the hex #0F172A; v4 redefined the palette in OKLCH as oklch(20.8% 0.042 265.755). In v3, slate-900 was #0F172A. The v4 value is ΔE OK 0.2 away, below the point where most people can tell them apart.
- How do I use slate-900 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-slate-900). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on slate-900?
- White text on slate-900 has a contrast ratio of 17.83:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 1.17:1 and fails AA even for large text. In APCA terms that is Lc −106.8 for white and Lc 0.0 for black.
- Which CSS named color is closest to slate-900?
- The closest is midnightblue (#191970) at ΔE OK 13.0, followed by navy and darkblue.
Last reviewed by Arielton Oberek.