Tailwind CSS v4 default palette
Tailwind blue-900: #1C398E
In Tailwind CSS v4, blue-900 is defined as --color-blue-900: oklch(37.9% 0.146 265.522), which is #1C398E in hex and rgb(28, 57, 142): a dark, moderately saturated blue. In Tailwind v3, blue-900 was #1E3A8A.
In OKLCH, blue-900 has a lightness of 37.9%, chroma 0.146 and hue 265.5°.
The value fits inside sRGB, so the hex #1C398E represents it without loss on any screen.
In v3, blue-900 was #1E3A8A. The v4 value is ΔE OK 0.8 away, below the point where most people can tell them apart; v4 is more saturated.
Tailwind blue is the default for links, focus rings and primary buttons in many projects built on the framework.
Color codes for blue-900
| Tailwind v4 token | --color-blue-900 |
|---|---|
| OKLCH (source value) | oklch(37.9% 0.146 265.522) |
| HEX | #1C398E |
| RGB | rgb(28, 57, 142) |
| HSL | hsl(225, 67%, 33%) |
| HWB | hwb(225 11% 44%) |
| CMYK (naive, no ICC profile) | cmyk(80%, 60%, 0%, 44%) |
| Decimal | 1,849,742 |
| Tailwind v3 hex | #1E3A8A |
| Utility classes | bg-blue-900, text-blue-900, border-blue-900 |
Tailwind blue scale
Contrast and accessibility
On blue-900, white text has a contrast ratio of 10.36:1 and passes AAA at any text size; black text reaches 2.02: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 blue-900 | 2.02:1 | Fail | Fail | Fail | Fail | 10.4 |
| White text on blue-900 | 10.36:1 | Pass | Pass | Pass | Pass | −97.6 |
| Blue-900 text on white | 10.36:1 | Pass | Pass | Pass | Pass | 93.5 |
| Blue-900 text on black | 2.02:1 | Fail | Fail | Fail | Fail | −9.0 |
Tints and shades
Each step mixes var(--color-blue-900) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-blue-900), white 25%) in CSS.
Tints (mixed with white)
- 5%
#274394 - 15%
#3e579f - 25%
#556baa - 35%
#6b7eb6 - 45%
#8292c1 - 55%
#99a6cc - 65%
#b0bad7 - 75%
#c6cee3 - 85%
#dde1ee - 95%
#f4f5f9
Shades (mixed with black)
- 5%
#1b3687 - 15%
#183079 - 25%
#152b6b - 35%
#12255c - 45%
#0f1f4e - 55%
#0d1a40 - 65%
#0a1432 - 75%
#070e24 - 85%
#040915 - 95%
#010307
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, blue-900's complementary color is #593D00 (close to darkslategray), its analogous colors are #004872 and #4B2985, and its triadic partners are #7E0B13 and #005400. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #593d00 |
| Analogous | −30°, +30° | #004872#4b2985 |
| Triadic | +120°, +240° | #7e0b13#005400 |
| Split-complementary | +150°, +210° | #6e2c00#414800 |
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 blue-900 is a cool color: its hue is 225° 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.
Nearest CSS named colors
| Color | HEX | ΔE OK |
|---|---|---|
| darkslateblue | #483d8b | 6.3 |
| midnightblue | #191970 | 9.3 |
| darkblue | #00008b | 10.6 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| indigo-900 | #312c85 | 3.9 |
| indigo-800 | #372aac | 6.3 |
| blue-800 | #193cb8 | 7.0 |
Code snippets
<div class="bg-blue-900 text-white">...</div>
<p class="text-blue-900 border-blue-900">...</p>.element {
color: var(--color-blue-900);
background-color: oklch(37.9% 0.146 265.522);
border-color: #1c398e;
outline-color: rgb(28 57 142);
}import SwiftUI
extension Color {
static let blue900 = Color(red: 0.110, green: 0.224, blue: 0.557)
}import androidx.compose.ui.graphics.Color
val Blue900 = Color(0xFF1C398E)import 'package:flutter/material.dart';
const blue900 = Color(0xFF1C398E);<!-- res/values/colors.xml -->
<color name="blue_900">#1C398E</color>Frequently asked questions
- What is the hex code for Tailwind blue-900?
- In Tailwind CSS v4, blue-900 is oklch(37.9% 0.146 265.522), which converts to #1C398E (rgb(28, 57, 142)) in sRGB. In Tailwind v3 the same name was #1E3A8A.
- What is the difference between blue-900 in Tailwind v3 and v4?
- v3 used the hex #1E3A8A; v4 redefined the palette in OKLCH as oklch(37.9% 0.146 265.522). In v3, blue-900 was #1E3A8A. The v4 value is ΔE OK 0.8 away, below the point where most people can tell them apart; v4 is more saturated.
- How do I use blue-900 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-blue-900). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on blue-900?
- White text on blue-900 has a contrast ratio of 10.36:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.02:1 and fails AA even for large text. In APCA terms that is Lc −97.6 for white and Lc 10.4 for black.
- Which CSS named color is closest to blue-900?
- The closest is darkslateblue (#483D8B) at ΔE OK 6.3, followed by midnightblue and darkblue.
Last reviewed by Arielton Oberek.