Skip to content

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.

blue-400#51A2FF

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

Color codes for blue-400
Tailwind v4 token--color-blue-400
OKLCH (source value)oklch(70.7% 0.165 254.624)
HEX#51A2FF
RGBrgb(81, 162, 255)
HSLhsl(212, 100%, 66%)
HWBhwb(212 32% 0%)
CMYK (naive, no ICC profile)cmyk(68%, 36%, 0%, 0%)
Decimal5,350,143
Display P3color(display-p3 0.3974 0.6281 0.9921)
Tailwind v3 hex#60A5FA
Utility classesbg-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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on blue-4007.96:1PassPassPassPass52.9
White text on blue-4002.63:1FailFailFailFail−56.2
Blue-400 text on white2.63:1FailFailFailFail51.1
Blue-400 text on black7.96:1PassPassPassPass−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)

  1. 5%
    #5aa7ff
  2. 15%
    #6bb0ff
  3. 25%
    #7db9ff
  4. 35%
    #8ec3ff
  5. 45%
    #9fccff
  6. 55%
    #b1d5ff
  7. 65%
    #c2deff
  8. 75%
    #d4e8ff
  9. 85%
    #e5f1ff
  10. 95%
    #f6faff

Shades (mixed with black)

  1. 5%
    #4d9af2
  2. 15%
    #458ad9
  3. 25%
    #3d7abf
  4. 35%
    #3569a6
  5. 45%
    #2d598c
  6. 55%
    #244973
  7. 65%
    #1c3959
  8. 75%
    #142940
  9. 85%
    #0c1826
  10. 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.

Color harmonies
HarmonyRotationColor
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

Nearest CSS named colors
ColorHEXΔE OK
cornflowerblue#6495ed4.4
dodgerblue#1e90ff6.1
deepskyblue#00bfff8.1

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
sky-500#00a6f45.5
sky-400#00bcff7.3
indigo-400#7c86ff7.7

Code snippets

Tailwind CSS
<div class="bg-blue-400 text-black">...</div>
<p class="text-blue-400 border-blue-400">...</p>
CSS
.element {
  color: var(--color-blue-400);
  background-color: oklch(70.7% 0.165 254.624);
  border-color: #51a2ff;
  outline-color: rgb(81 162 255);
}
SwiftUI
import SwiftUI

extension Color {
  static let blue400 = Color(red: 0.318, green: 0.635, blue: 1.000)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const blue400 = Color(0xFF51A2FF);
Android XML
<!-- 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.