Skip to content

Tailwind CSS v4 default palette

Tailwind red-900: #82181A

In Tailwind CSS v4, red-900 is defined as --color-red-900: oklch(39.6% 0.141 25.723), which is #82181A in hex and rgb(130, 24, 26): a dark, moderately saturated red. In Tailwind v3, red-900 was #7F1D1D.

red-900#82181A

In OKLCH, red-900 has a lightness of 39.6%, chroma 0.141 and hue 25.7°.

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

In v3, red-900 was #7F1D1D. The v4 value is ΔE OK 0.8 away, below the point where most people can tell them apart; v4 is more saturated.

Tailwind red is the default choice for errors and destructive actions; the 600 and 700 shades are the usual picks for text and buttons on white.

Color codes for red-900

Color codes for red-900
Tailwind v4 token--color-red-900
OKLCH (source value)oklch(39.6% 0.141 25.723)
HEX#82181A
RGBrgb(130, 24, 26)
HSLhsl(359, 69%, 30%)
HWBhwb(359 9% 49%)
CMYK (naive, no ICC profile)cmyk(0%, 82%, 80%, 49%)
Decimal8,525,850
Tailwind v3 hex#7F1D1D
Utility classesbg-red-900, text-red-900, border-red-900

Tailwind red scale

Contrast and accessibility

On red-900, white text has a contrast ratio of 10.02:1 and passes AAA at any text size; black text reaches 2.09: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 red-9002.09:1FailFailFailFail12.1
White text on red-90010.02:1PassPassPassPass−96.1
Red-900 text on white10.02:1PassPassPassPass91.8
Red-900 text on black2.09:1FailFailFailFail−10.5

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #882425
  2. 15%
    #953b3c
  3. 25%
    #a15253
  4. 35%
    #ae696a
  5. 45%
    #ba8081
  6. 55%
    #c79798
  7. 65%
    #d3aeaf
  8. 75%
    #e0c5c6
  9. 85%
    #ecdcdd
  10. 95%
    #f9f3f4

Shades (mixed with black)

  1. 5%
    #7c1719
  2. 15%
    #6f1416
  3. 25%
    #621214
  4. 35%
    #551011
  5. 45%
    #480d0e
  6. 55%
    #3a0b0c
  7. 65%
    #2e0809
  8. 75%
    #210607
  9. 85%
    #140404
  10. 95%
    #070101

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, red-900's complementary color is #00535D (close to darkslategray), its analogous colors are #7C1749 and #742F00, and its triadic partners are #005905 and #223E91. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#00535d
Analogous−30°, +30°#7c1749#742f00
Triadic+120°, +240°#005905#223e91
Split-complementary+150°, +210°#005644#004d79

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 red-900 is a warm color: its hue is 359° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.

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
darkred#8b00002.5
maroon#8000002.5
brown#a52a2a8.7

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
orange-900#7e2a0c3.6
rose-900#8b08364.6
amber-900#7b33065.6

Code snippets

Tailwind CSS
<div class="bg-red-900 text-white">...</div>
<p class="text-red-900 border-red-900">...</p>
CSS
.element {
  color: var(--color-red-900);
  background-color: oklch(39.6% 0.141 25.723);
  border-color: #82181a;
  outline-color: rgb(130 24 26);
}
SwiftUI
import SwiftUI

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

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

const red900 = Color(0xFF82181A);
Android XML
<!-- res/values/colors.xml -->
<color name="red_900">#82181A</color>

Frequently asked questions

What is the hex code for Tailwind red-900?
In Tailwind CSS v4, red-900 is oklch(39.6% 0.141 25.723), which converts to #82181A (rgb(130, 24, 26)) in sRGB. In Tailwind v3 the same name was #7F1D1D.
What is the difference between red-900 in Tailwind v3 and v4?
v3 used the hex #7F1D1D; v4 redefined the palette in OKLCH as oklch(39.6% 0.141 25.723). In v3, red-900 was #7F1D1D. 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 red-900 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-red-900). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on red-900?
White text on red-900 has a contrast ratio of 10.02:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.09:1 and fails AA even for large text. In APCA terms that is Lc −96.1 for white and Lc 12.1 for black.
Which CSS named color is closest to red-900?
The closest is darkred (#8B0000) at ΔE OK 2.5, followed by maroon and brown.

Last reviewed by Arielton Oberek.