Skip to content

Tailwind CSS v4 default palette

Tailwind amber-300: #FFD230

In Tailwind CSS v4, amber-300 is defined as --color-amber-300: oklch(87.9% 0.169 91.605), which is #FFD230 in hex and rgb(255, 210, 48): a very light, vivid amber. In Tailwind v3, amber-300 was #FCD34D.

amber-300#FFD230

In OKLCH, amber-300 has a lightness of 87.9%, chroma 0.169 and hue 91.6°.

This OKLCH value lies outside sRGB. The hex #FFD230 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.9743 0.8306 0.333).

In v3, amber-300 was #FCD34D. The v4 value is ΔE OK 1.6 away, below the point where most people can tell them apart; v4 is 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-300

Color codes for amber-300
Tailwind v4 token--color-amber-300
OKLCH (source value)oklch(87.9% 0.169 91.605)
HEX#FFD230
RGBrgb(255, 210, 48)
HSLhsl(47, 100%, 59%)
HWBhwb(47 19% 0%)
CMYK (naive, no ICC profile)cmyk(0%, 18%, 81%, 0%)
Decimal16,765,488
Display P3color(display-p3 0.9743 0.8306 0.333)
Tailwind v3 hex#FCD34D
Utility classesbg-amber-300, text-amber-300, border-amber-300

Tailwind amber scale

Contrast and accessibility

On amber-300, black text has a contrast ratio of 14.51:1 and passes AAA at any text size; white text reaches 1.44: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-30014.51:1PassPassPassPass82.6
White text on amber-3001.44:1FailFailFailFail−24.0
Amber-300 text on white1.44:1FailFailFailFail21.1
Amber-300 text on black14.51:1PassPassPassPass−82.2

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #ffd43a
  2. 15%
    #ffd94f
  3. 25%
    #ffdd64
  4. 35%
    #ffe278
  5. 45%
    #ffe68d
  6. 55%
    #ffeba2
  7. 65%
    #ffefb7
  8. 75%
    #fff4cb
  9. 85%
    #fff8e0
  10. 95%
    #fffdf5

Shades (mixed with black)

  1. 5%
    #f2c82e
  2. 15%
    #d9b329
  3. 25%
    #bf9e24
  4. 35%
    #a6891f
  5. 45%
    #8c741a
  6. 55%
    #735e16
  7. 65%
    #594a11
  8. 75%
    #40350c
  9. 85%
    #262007
  10. 95%
    #0d0b02

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, amber-300's complementary color is #C4D5FF (close to lightblue), its analogous colors are #FFC78B and #C6E85C, and its triadic partners are #3BEFFF and #FFB5FF. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#c4d5ff
Analogous−30°, +30°#ffc78b#c6e85c
Triadic+120°, +240°#3befff#ffb5ff
Split-complementary+150°, +210°#a2dfff#e2c9ff

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-300 is a warm color: its hue is 47° 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
gold#ffd7001.9
khaki#f0e68c7.2
palegoldenrod#eee8aa10.1

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
yellow-300#ffdf203.5
yellow-400#fcc8004.0
amber-400#ffba005.9

Code snippets

Tailwind CSS
<div class="bg-amber-300 text-black">...</div>
<p class="text-amber-300 border-amber-300">...</p>
CSS
.element {
  color: var(--color-amber-300);
  background-color: oklch(87.9% 0.169 91.605);
  border-color: #ffd230;
  outline-color: rgb(255 210 48);
}
SwiftUI
import SwiftUI

extension Color {
  static let amber300 = Color(red: 1.000, green: 0.824, blue: 0.188)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const amber300 = Color(0xFFFFD230);
Android XML
<!-- res/values/colors.xml -->
<color name="amber_300">#FFD230</color>

Frequently asked questions

What is the hex code for Tailwind amber-300?
In Tailwind CSS v4, amber-300 is oklch(87.9% 0.169 91.605), which converts to #FFD230 (rgb(255, 210, 48)) in sRGB after gamut mapping, because the OKLCH value is outside sRGB. In Tailwind v3 the same name was #FCD34D.
What is the difference between amber-300 in Tailwind v3 and v4?
v3 used the hex #FCD34D; v4 redefined the palette in OKLCH as oklch(87.9% 0.169 91.605). In v3, amber-300 was #FCD34D. The v4 value is ΔE OK 1.6 away, below the point where most people can tell them apart; v4 is more saturated.
How do I use amber-300 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-amber-300). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on amber-300?
White text on amber-300 has a contrast ratio of 1.44:1, which fails AA even for large text under WCAG 2.2. Black text reaches 14.51:1 and passes both AA and AAA. In APCA terms that is Lc −24.0 for white and Lc 82.6 for black.
Which CSS named color is closest to amber-300?
The closest is gold (#FFD700) at ΔE OK 1.9, followed by khaki and palegoldenrod.

Last reviewed by Arielton Oberek.