Tailwind CSS v3 color

Tailwind purple-600 #9333EA

Tailwind CSS v3's purple-600 is #9333EA. It is a vivid violet in the violet family. In OKLCH it sits at lightness 0.558, chroma 0.252 and hue 302.3°. The nearest CSS named color is blueviolet (#8A2BE2), ΔE2000 2.6 away.

Relative luminance
0.1451
OKLCH L · C · h
0.558 · 0.252 · 302.3
Best text
White 5.38:1
Hue family
Violet

#9333EA color codes

HEX
#9333EA
RGB
rgb(147, 51, 234)
HSL
hsl(271, 81%, 56%)
OKLCH
oklch(0.558 0.252 302.3)
OKLab
oklab(0.558 0.135 -0.213)
CIELAB (D65)
L* 44.96, a* 70.20, b* -74.73
XYZ (D65)
X 28.06, Y 14.51, Z 79.15
CMYK (naive)
cmyk(37%, 78%, 0%, 8%)

CIELAB and XYZ use the D65 white point; CSS lab() uses D50, so paste the OKLCH or HEX value into stylesheets. CMYK here is a plain formula with no press profile.

Legibility

Contrast: is #9333EA accessible?

White text on it reaches 5.38:1, passing AA. Black text manages only 3.90:1, enough for large text only.

WCAG 2 gives the same ratio whichever color is the text; APCA does not, so its Lc changes sign and size with polarity.

Open the Contrast System
  • Black text on it

    3.90:1

    • AA fails
    • AA large passes
    • AAA fails
    • APCA Lc +28
  • White text on it

    5.38:1

    • AA passes
    • AA large passes
    • AAA fails
    • APCA Lc −80
  • As text on black

    3.90:1

    • AA fails
    • AA large passes
    • AAA fails
    • APCA Lc −26
  • As text on white

    5.38:1

    • AA passes
    • AA large passes
    • AAA fails
    • APCA Lc +75

Nearest versions that pass 4.5:1

  • For text on white

    #9333EA 5.38:1

    It already reaches 5.38:1 on white, so no change is needed.

  • For text on black

    #9D41F6 4.52:1

    Lightening its OKLCH lightness from 0.56 to 0.59 reaches 4.52:1 on black, keeping the hue.

Checking another pair? Use the Contrast Checker.

Studio

Adjust #9333EA live

Move lightness, chroma and hue in OKLCH, or drag on the map. The map is every lightness and chroma at the current hue: sRGB inside the solid area, Display P3 out to the dashed line.

The studio needs JavaScript.

Scale

Shades and tints of #9333EA

Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #9333EA sits at step 600.

  1. 50#F7F3FF
    White
    1.09
    Black
    19.21
  2. 100#EFE6FF
    White
    1.20
    Black
    17.43
  3. 200#E0CDFF
    White
    1.46
    Black
    14.34
  4. 300#CDAAFF
    White
    1.94
    Black
    10.78
  5. 400#B880FF
    White
    2.77
    Black
    7.56
  6. 500#A64DFF
    White
    4.09
    Black
    5.12
  7. 600This color#9333EA
    White
    5.38
    Black
    3.90
  8. 700#7500C4
    White
    8.22
    Black
    2.55
  9. 800#560092
    White
    11.59
    Black
    1.81
  10. 900#390063
    White
    15.50
    Black
    1.35
  11. 950#20003C
    White
    18.63
    Black
    1.12

Under each step, white and black text on it; a bold figure passes 4.5:1.

Tailwind CSS v3 purple scale

The real Tailwind palette, for comparison with the computed ramp above.

  1. 50#FAF5FF
    White
    1.07
    Black
    19.56
  2. 100#F3E8FF
    White
    1.17
    Black
    17.79
  3. 200#E9D5FF
    White
    1.36
    Black
    15.42
  4. 300#D8B4FE
    White
    1.76
    Black
    11.87
  5. 400#C084FC
    White
    2.64
    Black
    7.94
  6. 500#A855F7
    White
    3.95
    Black
    5.30
  7. 600This color#9333EA
    White
    5.38
    Black
    3.90
  8. 700#7E22CE
    White
    6.98
    Black
    3.00
  9. 800#6B21A8
    White
    8.72
    Black
    2.40
  10. 900#581C87
    White
    10.87
    Black
    1.93
  11. 950#3B0764
    White
    14.99
    Black
    1.40

Gamut

How vivid #9333EA can get

At its lightness and hue, sRGB reaches OKLCH chroma 0.294; #9333EA uses 86% of it. Display P3, which many recent phones and laptops show, reaches 0.307 there: 4% more.

0.00.20.40.60.80.20.40.60.8 460480500520540560580600620
  • sRGB
  • Display P3
  • Rec. 2020
  • Dominant wavelength
OKLCH chroma
0.252
sRGB edge
0.294
Display P3 edge
0.307
Rec. 2020 edge
0.326
Dominant wavelength
Complementary 566 nm
Excitation purity
65%
Chromaticity
x 0.2306, y 0.1192
  • This color#9333EA
  • Most vivid in sRGB#9900FD
  • Most vivid in Display P3oklch(0.558 0.307 302.3)

On a screen without Display P3 the last tile shows the sRGB edge instead.

Use the wider color where screens show it
.accent {
  color: #9333ea;
}
@media (color-gamut: p3) {
  .accent { color: color(display-p3 0.5535 0 0.9758); }
}

Mixing

Mixing #9333EA

Each row is the same mix worked out in a different space, with the halfway color at its end. sRGB, which older CSS gradients use, can sag gray or dark in the middle; OKLab keeps the lightness steps even; OKLCH holds chroma and hue as it goes.

White #FFFFFF

  • sRGB50%#C999F5
  • OKLab50%#C6A3FA
  • OKLCH50%#C6A3FA

Black #000000

  • sRGB50%#4A1A75
  • OKLab50%#360D5A
  • OKLCH50%#360D5A

Its complement #667F00

  • sRGB50%#7D5975
  • OKLab50%#7A6C90
  • OKLCH50%#008295
In CSS
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #9333ea, white);
color: color-mix(in oklch, #9333ea 50%, white);

In use

#9333EA in an interface

A button, a link, a heading, a focused field, an icon and a chart line in this color, on a light page and a dark one. Each check is a WCAG 2 contrast minimum: 1.4.3 for text, 1.4.11 for the rest.

Light page

  • Button labelText, 4.5:15.38:1 Passes
  • Link and body-size textText, 4.5:15.38:1 Passes
  • Large headingLarge text, 3:15.38:1 Passes
  • Icons, borders and focus ringsNon-text, 3:15.38:1 Passes

Dark page

  • Button labelText, 4.5:15.38:1 Passes
  • Link and body-size textText, 4.5:13.48:1 Fails
  • Large headingLarge text, 3:13.48:1 Passes
  • Icons, borders and focus ringsNon-text, 3:13.48:1 Passes

For text on this page, the nearest shade that passes is #A54BFF 4.50:1

Color vision

How #9333EA looks with color blindness

Achromatopsia changes it most, ΔE2000 31.0; tritanopia changes it least, 19.5.

Simulated with Machado et al. (2009) at full severity, in linear light.

Simulate a whole page What each type sees
  • Protanopia

    No working red (long-wavelength) cones

    #0069EF ΔE2000 20.7

    Distinct

    Reads as vivid blue

  • Deuteranopia

    No working green (medium-wavelength) cones

    #006AE6 ΔE2000 21.8

    Distinct

    Reads as vivid blue

  • Tritanopia

    No working blue (short-wavelength) cones

    #80658F ΔE2000 19.5

    Distinct

    Reads as muted violet

  • Achromatopsia

    No cone color vision; lightness only

    #6A6A6A ΔE2000 31.0

    Distinct

    Reads as gray

Pairing check

Checked against its complement, #667F00. Their lightness contrast is only 1.17:1, so where hue collapses, add a label, icon or pattern.

VisionThe pairΔE2000Verdict
Normal vision#9333EA · #667F0080.3Stays distinct
Protanopia#0069EF · #87760062.5Stays distinct
Deuteranopia#006AE6 · #84761560.1Stays distinct
Tritanopia#80658F · #6C786B26.8Stays distinct
Achromatopsia#6A6A6A · #7676764.7Easily confused

Harmony

Color harmonies for #9333EA

Its complement is #667F00, a soft yellow.

Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.

Open the Harmony Studio
  • Base#9333EA
  • Complement#667F00

Complementary

Open in Harmony Studio
  • −30°#4B57FF
  • Base#9333EA
  • +30°#C000B2
  • Base#9333EA
  • +120°#A75F00
  • +240°#008678
  • Base#9333EA
  • +150°#8B7100
  • +210°#008B46

Split-complementary

Open in Harmony Studio

Code

Design tokens

Ready-to-paste tokens in six formats. Rename them to fit your system.

CSS custom property

:root {
  --color-purple-600: #9333ea;
}

Tailwind config

// tailwind.config.js — already built in as purple-600;
// pin the v3 value explicitly like this:
module.exports = {
  theme: {
    extend: {
      colors: {
        purple: { 600: '#9333ea' },
      },
    },
  },
};

Tailwind v4 theme

/* app.css — Tailwind CSS v4 */
@import "tailwindcss";

@theme {
  /* v4 has its own purple-600; this pins the v3 value. */
  --color-purple-600: oklch(0.558 0.252 302.3);
}

Design token (W3C DTCG)

{
  "color": {
    "purple-600": {
      "$type": "color",
      "$value": {
        "colorSpace": "srgb",
        "components": [0.5765, 0.2, 0.9176],
        "hex": "#9333ea"
      },
      "$description": "Tailwind CSS v3 purple-600"
    }
  }
}

SwiftUI color

import SwiftUI

enum Palette {
    static let purple600 = Color(.sRGB, red: 0.576, green: 0.200, blue: 0.918, opacity: 1)
}

Jetpack Compose color

import androidx.compose.ui.graphics.Color

object Palette {
    val Purple600 = Color(0xFF9333EA)
}

Matches

The nearest match in each system

The closest CSS name, Tailwind shade, RAL Classic paint and Crayola crayon by ΔE2000; under 2 is hard to tell apart side by side. RAL and Crayola values approximate physical colors.

Tools

Open #9333EA in the tools

Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.