Skip to content

Tailwind CSS v4 default palette

Tailwind amber-400: #FFBA00

In Tailwind CSS v4, amber-400 is defined as --color-amber-400: oklch(82.8% 0.189 84.429), which is #FFBA00 in hex and rgb(255, 186, 0): a very light, vivid amber. In Tailwind v3, amber-400 was #FBBF24.

amber-400#FFBA00

In OKLCH, amber-400 has a lightness of 82.8%, chroma 0.189 and hue 84.4°. It is the most saturated shade of the amber scale.

This OKLCH value lies outside sRGB. The hex #FFBA00 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.9592 0.7385 0.1183).

In v3, amber-400 was #FBBF24. The v4 value is ΔE OK 2.6 away; v4 is darker and more saturated.

Tailwind amber sits between orange and yellow and is the conventional warning color; its light shades make readable callout backgrounds.

Color codes for amber-400

Color codes for amber-400
Tailwind v4 token--color-amber-400
OKLCH (source value)oklch(82.8% 0.189 84.429)
HEX#FFBA00
RGBrgb(255, 186, 0)
HSLhsl(44, 100%, 50%)
HWBhwb(44 0% 0%)
CMYK (naive, no ICC profile)cmyk(0%, 27%, 100%, 0%)
Decimal16,759,296
Display P3color(display-p3 0.9592 0.7385 0.1183)
Tailwind v3 hex#FBBF24
Utility classesbg-amber-400, text-amber-400, border-amber-400

Tailwind amber scale

Contrast and accessibility

On amber-400, black text has a contrast ratio of 12.27:1 and passes AAA at any text size; white text reaches 1.71: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 amber-40012.27:1PassPassPassPass73.4
White text on amber-4001.71:1FailFailFailFail−34.2
Amber-400 text on white1.71:1FailFailFailFail30.4
Amber-400 text on black12.27:1PassPassPassPass−72.4

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #ffbd0d
  2. 15%
    #ffc426
  3. 25%
    #ffcb40
  4. 35%
    #ffd259
  5. 45%
    #ffd973
  6. 55%
    #ffe08c
  7. 65%
    #ffe7a6
  8. 75%
    #ffeebf
  9. 85%
    #fff5d9
  10. 95%
    #fffcf2

Shades (mixed with black)

  1. 5%
    #f2b100
  2. 15%
    #d99e00
  3. 25%
    #bf8c00
  4. 35%
    #a67900
  5. 45%
    #8c6600
  6. 55%
    #735400
  7. 65%
    #594100
  8. 75%
    #402f00
  9. 85%
    #261c00
  10. 95%
    #0d0900

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, amber-400's complementary color is #A4C6FF (close to lightskyblue), its analogous colors are #FFAD6B and #C5D300, and its triadic partners are #00E3F7 and #FF98FF. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#a4c6ff
Analogous−30°, +30°#ffad6b#c5d300
Triadic+120°, +240°#00e3f7#ff98ff
Split-complementary+150°, +210°#69d4ff#cbb7ff

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 amber-400 is a warm color: its hue is 44° 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
orange#ffa5005.9
gold#ffd7006.9
goldenrod#daa5208.7

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
yellow-500#efb1003.4
yellow-400#fcc8003.6
amber-300#ffd2305.9

Code snippets

Tailwind CSS
<div class="bg-amber-400 text-black">...</div>
<p class="text-amber-400 border-amber-400">...</p>
CSS
.element {
  color: var(--color-amber-400);
  background-color: oklch(82.8% 0.189 84.429);
  border-color: #ffba00;
  outline-color: rgb(255 186 0);
}
SwiftUI
import SwiftUI

extension Color {
  static let amber400 = Color(red: 1.000, green: 0.729, blue: 0.000)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const amber400 = Color(0xFFFFBA00);
Android XML
<!-- res/values/colors.xml -->
<color name="amber_400">#FFBA00</color>

Frequently asked questions

What is the hex code for Tailwind amber-400?
In Tailwind CSS v4, amber-400 is oklch(82.8% 0.189 84.429), which converts to #FFBA00 (rgb(255, 186, 0)) in sRGB after gamut mapping, because the OKLCH value is outside sRGB. In Tailwind v3 the same name was #FBBF24.
What is the difference between amber-400 in Tailwind v3 and v4?
v3 used the hex #FBBF24; v4 redefined the palette in OKLCH as oklch(82.8% 0.189 84.429). In v3, amber-400 was #FBBF24. The v4 value is ΔE OK 2.6 away; v4 is darker and more saturated.
How do I use amber-400 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-amber-400). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on amber-400?
White text on amber-400 has a contrast ratio of 1.71:1, which fails AA even for large text under WCAG 2.2. Black text reaches 12.27:1 and passes both AA and AAA. In APCA terms that is Lc −34.2 for white and Lc 73.4 for black.
Which CSS named color is closest to amber-400?
The closest is orange (#FFA500) at ΔE OK 5.9, followed by gold and goldenrod.

Last reviewed by Arielton Oberek.