Skip to content

Tailwind CSS v4 default palette

Tailwind indigo-400: #7C86FF

In Tailwind CSS v4, indigo-400 is defined as --color-indigo-400: oklch(67.3% 0.182 276.935), which is #7C86FF in hex and rgb(124, 134, 255): a medium, vivid blue. In Tailwind v3, indigo-400 was #818CF8.

indigo-400#7C86FF

In OKLCH, indigo-400 has a lightness of 67.3%, chroma 0.182 and hue 276.9°.

This OKLCH value lies outside sRGB. The hex #7C86FF 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.495 0.5253 0.9851).

In v3, indigo-400 was #818CF8. The v4 value is ΔE OK 2.5 away; v4 is darker and 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-400

Color codes for indigo-400
Tailwind v4 token--color-indigo-400
OKLCH (source value)oklch(67.3% 0.182 276.935)
HEX#7C86FF
RGBrgb(124, 134, 255)
HSLhsl(235, 100%, 74%)
HWBhwb(235 49% 0%)
CMYK (naive, no ICC profile)cmyk(51%, 47%, 0%, 0%)
Decimal8,161,023
Display P3color(display-p3 0.495 0.5253 0.9851)
Tailwind v3 hex#818CF8
Utility classesbg-indigo-400, text-indigo-400, border-indigo-400

Tailwind indigo scale

Contrast and accessibility

On indigo-400, black text has a contrast ratio of 6.71:1 and passes AA for normal text; white text reaches 3.12: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 indigo-4006.71:1PassPassFailPass45.9
White text on indigo-4003.12:1FailPassFailFail−63.5
Indigo-400 text on white3.12:1FailPassFailFail58.1
Indigo-400 text on black6.71:1PassPassFailPass−43.6

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #838cff
  2. 15%
    #9098ff
  3. 25%
    #9da4ff
  4. 35%
    #aab0ff
  5. 45%
    #b7bcff
  6. 55%
    #c4c9ff
  7. 65%
    #d1d5ff
  8. 75%
    #dee1ff
  9. 85%
    #ebedff
  10. 95%
    #f8f9ff

Shades (mixed with black)

  1. 5%
    #767ff2
  2. 15%
    #6972d9
  3. 25%
    #5d65bf
  4. 35%
    #5157a6
  5. 45%
    #444a8c
  6. 55%
    #383c73
  7. 65%
    #2b2f59
  8. 75%
    #1f2240
  9. 85%
    #131426
  10. 95%
    #06070d

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, indigo-400's complementary color is #B29400 (close to darkgoldenrod), its analogous colors are #009CFE and #B472EC, and its triadic partners are #F0643A and #00B666. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#b29400
Analogous−30°, +30°#009cfe#b472ec
Triadic+120°, +240°#f0643a#00b666
Split-complementary+150°, +210°#d97c00#78a900

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-400 is a cool color: its hue is 235° 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#6495ed6.0
mediumslateblue#7b68ee7.5
mediumpurple#9370db7.8

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
violet-400#a684ff6.0
blue-400#51a2ff7.7
blue-500#2b7fff8.4

Code snippets

Tailwind CSS
<div class="bg-indigo-400 text-black">...</div>
<p class="text-indigo-400 border-indigo-400">...</p>
CSS
.element {
  color: var(--color-indigo-400);
  background-color: oklch(67.3% 0.182 276.935);
  border-color: #7c86ff;
  outline-color: rgb(124 134 255);
}
SwiftUI
import SwiftUI

extension Color {
  static let indigo400 = Color(red: 0.486, green: 0.525, blue: 1.000)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const indigo400 = Color(0xFF7C86FF);
Android XML
<!-- res/values/colors.xml -->
<color name="indigo_400">#7C86FF</color>

Frequently asked questions

What is the hex code for Tailwind indigo-400?
In Tailwind CSS v4, indigo-400 is oklch(67.3% 0.182 276.935), which converts to #7C86FF (rgb(124, 134, 255)) in sRGB after gamut mapping, because the OKLCH value is outside sRGB. In Tailwind v3 the same name was #818CF8.
What is the difference between indigo-400 in Tailwind v3 and v4?
v3 used the hex #818CF8; v4 redefined the palette in OKLCH as oklch(67.3% 0.182 276.935). In v3, indigo-400 was #818CF8. The v4 value is ΔE OK 2.5 away; v4 is darker and more saturated.
How do I use indigo-400 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-indigo-400). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on indigo-400?
White text on indigo-400 has a contrast ratio of 3.12:1, which passes AA only for large text (24 px, or 18.66 px bold, and up) under WCAG 2.2. Black text reaches 6.71:1 and passes AA for normal text but not AAA. In APCA terms that is Lc −63.5 for white and Lc 45.9 for black.
Which CSS named color is closest to indigo-400?
The closest is cornflowerblue (#6495ED) at ΔE OK 6.0, followed by mediumslateblue and mediumpurple.

Last reviewed by Arielton Oberek.