Tailwind CSS v4 default palette
Tailwind indigo-900: #312C85
In Tailwind CSS v4, indigo-900 is defined as --color-indigo-900: oklch(35.9% 0.144 278.697), which is #312C85 in hex and rgb(49, 44, 133): a dark, moderately saturated blue. In Tailwind v3, indigo-900 was #312E81.
In OKLCH, indigo-900 has a lightness of 35.9%, chroma 0.144 and hue 278.7°.
The value fits inside sRGB, so the hex #312C85 represents it without loss on any screen.
In v3, indigo-900 was #312E81. The v4 value is ΔE OK 0.9 away, below the point where most people can tell them apart; v4 is more saturated.
Tailwind indigo is a blue-violet and the accent color in many Tailwind UI examples and early Tailwind templates.
Color codes for indigo-900
| Tailwind v4 token | --color-indigo-900 |
|---|---|
| OKLCH (source value) | oklch(35.9% 0.144 278.697) |
| HEX | #312C85 |
| RGB | rgb(49, 44, 133) |
| HSL | hsl(243, 50%, 35%) |
| HWB | hwb(243 17% 48%) |
| CMYK (naive, no ICC profile) | cmyk(63%, 67%, 0%, 48%) |
| Decimal | 3,222,661 |
| Tailwind v3 hex | #312E81 |
| Utility classes | bg-indigo-900, text-indigo-900, border-indigo-900 |
Tailwind indigo scale
Contrast and accessibility
On indigo-900, white text has a contrast ratio of 11.47:1 and passes AAA at any text size; black text reaches 1.82: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 indigo-900 | 1.82:1 | Fail | Fail | Fail | Fail | 8.0 |
| White text on indigo-900 | 11.47:1 | Pass | Pass | Pass | Pass | −99.7 |
| Indigo-900 text on white | 11.47:1 | Pass | Pass | Pass | Pass | 95.9 |
| Indigo-900 text on black | 1.82:1 | Fail | Fail | Fail | Fail | 0.0 |
Tints and shades
Each step mixes var(--color-indigo-900) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-indigo-900), white 25%) in CSS.
Tints (mixed with white)
- 5%
#3b378b - 15%
#504c97 - 25%
#6561a4 - 35%
#7976b0 - 45%
#8e8bbc - 55%
#a2a0c8 - 65%
#b7b5d4 - 75%
#cccae1 - 85%
#e0dfed - 95%
#f5f4f9
Shades (mixed with black)
- 5%
#2f2a7e - 15%
#2a2571 - 25%
#252164 - 35%
#201d56 - 45%
#1b1849 - 55%
#16143c - 65%
#110f2f - 75%
#0c0b21 - 85%
#070714 - 95%
#020207
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, indigo-900's complementary color is #4A3C00 (close to darkslategray), its analogous colors are #003D7E and #521D75, and its triadic partners are #760C00 and #004D26. For text on top, white gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #4a3c00 |
| Analogous | −30°, +30° | #003d7e#521d75 |
| Triadic | +120°, +240° | #760c00#004d26 |
| Split-complementary | +150°, +210° | #5d3000#294700 |
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 indigo-900 is a cool color: its hue is 243° 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.1 |
| midnightblue | #191970 | 7.2 |
| indigo | #4b0082 | 7.6 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| blue-900 | #1c398e | 3.9 |
| indigo-800 | #372aac | 6.4 |
| violet-900 | #4d179a | 6.6 |
Code snippets
<div class="bg-indigo-900 text-white">...</div>
<p class="text-indigo-900 border-indigo-900">...</p>.element {
color: var(--color-indigo-900);
background-color: oklch(35.9% 0.144 278.697);
border-color: #312c85;
outline-color: rgb(49 44 133);
}import SwiftUI
extension Color {
static let indigo900 = Color(red: 0.192, green: 0.173, blue: 0.522)
}import androidx.compose.ui.graphics.Color
val Indigo900 = Color(0xFF312C85)import 'package:flutter/material.dart';
const indigo900 = Color(0xFF312C85);<!-- res/values/colors.xml -->
<color name="indigo_900">#312C85</color>Frequently asked questions
- What is the hex code for Tailwind indigo-900?
- In Tailwind CSS v4, indigo-900 is oklch(35.9% 0.144 278.697), which converts to #312C85 (rgb(49, 44, 133)) in sRGB. In Tailwind v3 the same name was #312E81.
- What is the difference between indigo-900 in Tailwind v3 and v4?
- v3 used the hex #312E81; v4 redefined the palette in OKLCH as oklch(35.9% 0.144 278.697). In v3, indigo-900 was #312E81. The v4 value is ΔE OK 0.9 away, below the point where most people can tell them apart; v4 is more saturated.
- How do I use indigo-900 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-indigo-900). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on indigo-900?
- White text on indigo-900 has a contrast ratio of 11.47:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 1.82:1 and fails AA even for large text. In APCA terms that is Lc −99.7 for white and Lc 8.0 for black.
- Which CSS named color is closest to indigo-900?
- The closest is darkslateblue (#483D8B) at ΔE OK 6.1, followed by midnightblue and indigo.
Last reviewed by Arielton Oberek.