Tailwind CSS v4 default palette
Tailwind purple-500: #AD46FF
In Tailwind CSS v4, purple-500 is defined as --color-purple-500: oklch(62.7% 0.265 303.9), which is #AD46FF in hex and rgb(173, 70, 255): a medium, vivid violet. In Tailwind v3, purple-500 was #A855F7.
In OKLCH, purple-500 has a lightness of 62.7%, chroma 0.265 and hue 303.9°.
This OKLCH value lies outside sRGB. The hex #AD46FF 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.6295 0.3009 0.9908).
In v3, purple-500 was #A855F7. The v4 value is ΔE OK 3.2 away; 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-500
| Tailwind v4 token | --color-purple-500 |
|---|---|
| OKLCH (source value) | oklch(62.7% 0.265 303.9) |
| HEX | #AD46FF |
| RGB | rgb(173, 70, 255) |
| HSL | hsl(273, 100%, 64%) |
| HWB | hwb(273 27% 0%) |
| CMYK (naive, no ICC profile) | cmyk(32%, 73%, 0%, 0%) |
| Decimal | 11,355,903 |
| Display P3 | color(display-p3 0.6295 0.3009 0.9908) |
| Tailwind v3 hex | #A855F7 |
| Utility classes | bg-purple-500, text-purple-500, border-purple-500 |
Tailwind purple scale
Contrast and accessibility
On purple-500, black text has a contrast ratio of 5.09:1 and passes AA for normal text; white text reaches 4.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.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on purple-500 | 5.09:1 | Pass | Pass | Fail | Pass | 36.8 |
| White text on purple-500 | 4.12:1 | Fail | Pass | Fail | Fail | −72.8 |
| Purple-500 text on white | 4.12:1 | Fail | Pass | Fail | Fail | 67.3 |
| Purple-500 text on black | 5.09:1 | Pass | Pass | Fail | Pass | −34.3 |
Tints and shades
Each step mixes var(--color-purple-500) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-purple-500), white 25%) in CSS.
Tints (mixed with white)
- 5%
#b14fff - 15%
#b962ff - 25%
#c274ff - 35%
#ca87ff - 45%
#d299ff - 55%
#daacff - 65%
#e2beff - 75%
#ebd1ff - 85%
#f3e3ff - 95%
#fbf6ff
Shades (mixed with black)
- 5%
#a443f2 - 15%
#933cd9 - 25%
#8235bf - 35%
#702ea6 - 45%
#5f278c - 55%
#4e1f73 - 65%
#3d1959 - 75%
#2b1240 - 85%
#1a0b26 - 95%
#09040d
Color harmonies
Rotating the hue in OKLCH while keeping lightness and chroma, purple-500's complementary color is #739800 (close to olivedrab), its analogous colors are #6372FF and #DE20C8, and its triadic partners are #CA6D00 and #00A191. For text on top, black gives the higher contrast.
| Harmony | Rotation | Color |
|---|---|---|
| Complementary | +180° | #739800 |
| Analogous | −30°, +30° | #6372ff#de20c8 |
| Triadic | +120°, +240° | #ca6d00#00a191 |
| Split-complementary | +150°, +210° | #a68500#00a74f |
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-500 is a cool color: its hue is 273° 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 |
|---|---|---|
| mediumorchid | #ba55d3 | 8.8 |
| blueviolet | #8a2be2 | 9.5 |
| darkorchid | #9932cc | 9.9 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| violet-500 | #8e51ff | 5.6 |
| purple-600 | #9810fa | 7.3 |
| violet-600 | #7f22fe | 10.2 |
Code snippets
<div class="bg-purple-500 text-black">...</div>
<p class="text-purple-500 border-purple-500">...</p>.element {
color: var(--color-purple-500);
background-color: oklch(62.7% 0.265 303.9);
border-color: #ad46ff;
outline-color: rgb(173 70 255);
}import SwiftUI
extension Color {
static let purple500 = Color(red: 0.678, green: 0.275, blue: 1.000)
}import androidx.compose.ui.graphics.Color
val Purple500 = Color(0xFFAD46FF)import 'package:flutter/material.dart';
const purple500 = Color(0xFFAD46FF);<!-- res/values/colors.xml -->
<color name="purple_500">#AD46FF</color>Frequently asked questions
- What is the hex code for Tailwind purple-500?
- In Tailwind CSS v4, purple-500 is oklch(62.7% 0.265 303.9), which converts to #AD46FF (rgb(173, 70, 255)) in sRGB after gamut mapping, because the OKLCH value is outside sRGB. In Tailwind v3 the same name was #A855F7.
- What is the difference between purple-500 in Tailwind v3 and v4?
- v3 used the hex #A855F7; v4 redefined the palette in OKLCH as oklch(62.7% 0.265 303.9). In v3, purple-500 was #A855F7. The v4 value is ΔE OK 3.2 away; v4 is more saturated.
- How do I use purple-500 in plain CSS?
- Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-purple-500). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
- Can you use white text on purple-500?
- White text on purple-500 has a contrast ratio of 4.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 5.09:1 and passes AA for normal text but not AAA. In APCA terms that is Lc −72.8 for white and Lc 36.8 for black.
- Which CSS named color is closest to purple-500?
- The closest is mediumorchid (#BA55D3) at ΔE OK 8.8, followed by blueviolet and darkorchid.
Last reviewed by Arielton Oberek.