Tailwind CSS v4 default palette
Tailwind purple-300: #DAB2FF
In Tailwind CSS v4, purple-300 is defined as --color-purple-300: oklch(82.7% 0.119 306.383), which is #DAB2FF in hex and rgb(218, 178, 255): a very light, moderately saturated violet. In Tailwind v3, purple-300 was #D8B4FE.
In OKLCH, purple-300 has a lightness of 82.7%, chroma 0.119 and hue 306.4°.
This OKLCH value lies outside sRGB. The hex #DAB2FF 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.8294 0.7037 0.9961).
In v3, purple-300 was #D8B4FE. The v4 value is ΔE OK 1.1 away, below the point where most people can tell them apart; v4 is more saturated.
Tailwind purple is a redder, more magenta-leaning violet than violet, with very high chroma in its mid shades.
Color codes for purple-300
| Tailwind v4 token | --color-purple-300 |
|---|---|
| OKLCH (source value) | oklch(82.7% 0.119 306.383) |
| HEX | #DAB2FF |
| RGB | rgb(218, 178, 255) |
| HSL | hsl(271, 100%, 85%) |
| HWB | hwb(271 70% 0%) |
| CMYK (naive, no ICC profile) | cmyk(15%, 30%, 0%, 0%) |
| Decimal | 14,332,671 |
| Display P3 | color(display-p3 0.8294 0.7037 0.9961) |
| Tailwind v3 hex | #D8B4FE |
| Utility classes | bg-purple-300, text-purple-300, border-purple-300 |
Tailwind purple scale
Contrast and accessibility
On purple-300, black text has a contrast ratio of 11.79:1 and passes AAA at any text size; white text reaches 1.78: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 purple-300 | 11.79:1 | Pass | Pass | Pass | Pass | 71.1 |
| White text on purple-300 | 1.78:1 | Fail | Fail | Fail | Fail | −36.8 |
| Purple-300 text on white | 1.78:1 | Fail | Fail | Fail | Fail | 32.8 |
| Purple-300 text on black | 11.79:1 | Pass | Pass | Pass | Pass | −69.9 |
Tints and shades
Each step mixes var(--color-purple-300) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-purple-300), white 25%) in CSS.
Tints (mixed with white)
- 5%
#dcb6ff - 15%
#e0beff - 25%
#e3c5ff - 35%
#e7cdff - 45%
#ebd5ff - 55%
#eedcff - 65%
#f2e4ff - 75%
#f6ecff - 85%
#f9f3ff - 95%
#fdfbff
Shades (mixed with black)
- 5%
#cfa9f2 - 15%
#b997d9 - 25%
#a486bf - 35%
#8e74a6 - 45%
#78628c - 55%
#625073 - 65%
#4c3e59 - 75%
#372d40 - 85%
#211b26 - 95%
#0b090d
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, purple-300's complementary color is #B2D57E (close to lightgreen), its analogous colors are #B3C0FF and #F8A8E3, and its triadic partners are #FBB76F and #57DFD2. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #b2d57e |
| Analogous | −30°, +30° | #b3c0ff#f8a8e3 |
| Triadic | +120°, +240° | #fbb76f#57dfd2 |
| Split-complementary | +150°, +210° | #ddc667#81dea6 |
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 purple-300 is a cool color: its hue is 271° 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 |
|---|---|---|
| plum | #dda0dd | 6.0 |
| thistle | #d8bfd8 | 7.9 |
| lightsteelblue | #b0c4de | 9.9 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| violet-300 | #c4b4ff | 3.1 |
| fuchsia-300 | #f4a8ff | 4.4 |
| indigo-300 | #a3b3ff | 7.7 |
Code snippets
<div class="bg-purple-300 text-black">...</div>
<p class="text-purple-300 border-purple-300">...</p>.element {
color: var(--color-purple-300);
background-color: oklch(82.7% 0.119 306.383);
border-color: #dab2ff;
outline-color: rgb(218 178 255);
}import SwiftUI
extension Color {
static let purple300 = Color(red: 0.855, green: 0.698, blue: 1.000)
}import androidx.compose.ui.graphics.Color
val Purple300 = Color(0xFFDAB2FF)import 'package:flutter/material.dart';
const purple300 = Color(0xFFDAB2FF);<!-- res/values/colors.xml -->
<color name="purple_300">#DAB2FF</color>Frequently asked questions
- What is the hex code for Tailwind purple-300?
- In Tailwind CSS v4, purple-300 is oklch(82.7% 0.119 306.383), which converts to #DAB2FF (rgb(218, 178, 255)) in sRGB after gamut mapping, because the OKLCH value is outside sRGB. In Tailwind v3 the same name was #D8B4FE.
- What is the difference between purple-300 in Tailwind v3 and v4?
- v3 used the hex #D8B4FE; v4 redefined the palette in OKLCH as oklch(82.7% 0.119 306.383). In v3, purple-300 was #D8B4FE. The v4 value is ΔE OK 1.1 away, below the point where most people can tell them apart; v4 is more saturated.
- How do I use purple-300 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-purple-300). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on purple-300?
- White text on purple-300 has a contrast ratio of 1.78:1, which fails AA even for large text under WCAG 2.2. Black text reaches 11.79:1 and passes both AA and AAA. In APCA terms that is Lc −36.8 for white and Lc 71.1 for black.
- Which CSS named color is closest to purple-300?
- The closest is plum (#DDA0DD) at ΔE OK 6.0, followed by thistle and lightsteelblue.
Last reviewed by Arielton Oberek.