Tailwind CSS v4 default palette
Tailwind blue-400: #51A2FF
In Tailwind CSS v4, blue-400 is defined as --color-blue-400: oklch(70.7% 0.165 254.624), which is #51A2FF in hex and rgb(81, 162, 255): a light, vivid sky blue. In Tailwind v3, blue-400 was #60A5FA.
In OKLCH, blue-400 has a lightness of 70.7%, chroma 0.165 and hue 254.6°.
This OKLCH value lies outside sRGB. The hex #51A2FF is the sRGB fallback from the CSS Color 4 gamut mapping algorithm; on Display P3 screens browsers show a more saturated color, close to color(display-p3 0.3974 0.6281 0.9921).
In v3, blue-400 was #60A5FA. The v4 value is ΔE OK 2.3 away; v4 is darker and 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-400
| Tailwind v4 token | --color-blue-400 |
|---|---|
| OKLCH (source value) | oklch(70.7% 0.165 254.624) |
| HEX | #51A2FF |
| RGB | rgb(81, 162, 255) |
| HSL | hsl(212, 100%, 66%) |
| HWB | hwb(212 32% 0%) |
| CMYK (naive, no ICC profile) | cmyk(68%, 36%, 0%, 0%) |
| Decimal | 5,350,143 |
| Display P3 | color(display-p3 0.3974 0.6281 0.9921) |
| Tailwind v3 hex | #60A5FA |
| Utility classes | bg-blue-400, text-blue-400, border-blue-400 |
Tailwind blue scale
Contrast and accessibility
On blue-400, black text has a contrast ratio of 7.96:1 and passes AAA at any text size; white text reaches 2.63: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-400 | 7.96:1 | Pass | Pass | Pass | Pass | 52.9 |
| White text on blue-400 | 2.63:1 | Fail | Fail | Fail | Fail | −56.2 |
| Blue-400 text on white | 2.63:1 | Fail | Fail | Fail | Fail | 51.1 |
| Blue-400 text on black | 7.96:1 | Pass | Pass | Pass | Pass | −50.8 |
Tints and shades
Each step mixes var(--color-blue-400) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-blue-400), white 25%) in CSS.
Tints (mixed with white)
- 5%
#5aa7ff - 15%
#6bb0ff - 25%
#7db9ff - 35%
#8ec3ff - 45%
#9fccff - 55%
#b1d5ff - 65%
#c2deff - 75%
#d4e8ff - 85%
#e5f1ff - 95%
#f6faff
Shades (mixed with black)
- 5%
#4d9af2 - 15%
#458ad9 - 25%
#3d7abf - 35%
#3569a6 - 45%
#2d598c - 55%
#244973 - 65%
#1c3959 - 75%
#142940 - 85%
#0c1826 - 95%
#04080d
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, blue-400's complementary color is #DB8E00 (close to peru), its analogous colors are #00B3E8 and #978FFF, and its triadic partners are #F56F80 and #72B642. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #db8e00 |
| Analogous | −30°, +30° | #00b3e8#978fff |
| Triadic | +120°, +240° | #f56f80#72b642 |
| Split-complementary | +150°, +210° | #f2793e#b2a400 |
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-400 is a cool color: its hue is 212° 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 |
|---|---|---|
| cornflowerblue | #6495ed | 4.4 |
| dodgerblue | #1e90ff | 6.1 |
| deepskyblue | #00bfff | 8.1 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| sky-500 | #00a6f4 | 5.5 |
| sky-400 | #00bcff | 7.3 |
| indigo-400 | #7c86ff | 7.7 |
Code snippets
<div class="bg-blue-400 text-black">...</div>
<p class="text-blue-400 border-blue-400">...</p>.element {
color: var(--color-blue-400);
background-color: oklch(70.7% 0.165 254.624);
border-color: #51a2ff;
outline-color: rgb(81 162 255);
}import SwiftUI
extension Color {
static let blue400 = Color(red: 0.318, green: 0.635, blue: 1.000)
}import androidx.compose.ui.graphics.Color
val Blue400 = Color(0xFF51A2FF)import 'package:flutter/material.dart';
const blue400 = Color(0xFF51A2FF);<!-- res/values/colors.xml -->
<color name="blue_400">#51A2FF</color>Frequently asked questions
- What is the hex code for Tailwind blue-400?
- In Tailwind CSS v4, blue-400 is oklch(70.7% 0.165 254.624), which converts to #51A2FF (rgb(81, 162, 255)) in sRGB after gamut mapping, because the OKLCH value is outside sRGB. In Tailwind v3 the same name was #60A5FA.
- What is the difference between blue-400 in Tailwind v3 and v4?
- v3 used the hex #60A5FA; v4 redefined the palette in OKLCH as oklch(70.7% 0.165 254.624). In v3, blue-400 was #60A5FA. The v4 value is ΔE OK 2.3 away; v4 is darker and more saturated.
- How do I use blue-400 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-blue-400). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on blue-400?
- White text on blue-400 has a contrast ratio of 2.63:1, which fails AA even for large text under WCAG 2.2. Black text reaches 7.96:1 and passes both AA and AAA. In APCA terms that is Lc −56.2 for white and Lc 52.9 for black.
- Which CSS named color is closest to blue-400?
- The closest is cornflowerblue (#6495ED) at ΔE OK 4.4, followed by dodgerblue and deepskyblue.
Last reviewed by Arielton Oberek.