Skip to content

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.

purple-500#AD46FF

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

Color codes for purple-500
Tailwind v4 token--color-purple-500
OKLCH (source value)oklch(62.7% 0.265 303.9)
HEX#AD46FF
RGBrgb(173, 70, 255)
HSLhsl(273, 100%, 64%)
HWBhwb(273 27% 0%)
CMYK (naive, no ICC profile)cmyk(32%, 73%, 0%, 0%)
Decimal11,355,903
Display P3color(display-p3 0.6295 0.3009 0.9908)
Tailwind v3 hex#A855F7
Utility classesbg-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.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on purple-5005.09:1PassPassFailPass36.8
White text on purple-5004.12:1FailPassFailFail−72.8
Purple-500 text on white4.12:1FailPassFailFail67.3
Purple-500 text on black5.09:1PassPassFailPass−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)

  1. 5%
    #b14fff
  2. 15%
    #b962ff
  3. 25%
    #c274ff
  4. 35%
    #ca87ff
  5. 45%
    #d299ff
  6. 55%
    #daacff
  7. 65%
    #e2beff
  8. 75%
    #ebd1ff
  9. 85%
    #f3e3ff
  10. 95%
    #fbf6ff

Shades (mixed with black)

  1. 5%
    #a443f2
  2. 15%
    #933cd9
  3. 25%
    #8235bf
  4. 35%
    #702ea6
  5. 45%
    #5f278c
  6. 55%
    #4e1f73
  7. 65%
    #3d1959
  8. 75%
    #2b1240
  9. 85%
    #1a0b26
  10. 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.

Color harmonies
HarmonyRotationColor
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

Nearest CSS named colors
ColorHEXΔE OK
mediumorchid#ba55d38.8
blueviolet#8a2be29.5
darkorchid#9932cc9.9

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
violet-500#8e51ff5.6
purple-600#9810fa7.3
violet-600#7f22fe10.2

Code snippets

Tailwind CSS
<div class="bg-purple-500 text-black">...</div>
<p class="text-purple-500 border-purple-500">...</p>
CSS
.element {
  color: var(--color-purple-500);
  background-color: oklch(62.7% 0.265 303.9);
  border-color: #ad46ff;
  outline-color: rgb(173 70 255);
}
SwiftUI
import SwiftUI

extension Color {
  static let purple500 = Color(red: 0.678, green: 0.275, blue: 1.000)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const purple500 = Color(0xFFAD46FF);
Android XML
<!-- 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.