Tailwind CSS v3 color

Tailwind violet-600 #7C3AED

Tailwind CSS v3's violet-600 is #7C3AED. It is a vivid violet in the violet family. In OKLCH it sits at lightness 0.541, chroma 0.247 and hue 293.0°. The nearest CSS named color is blueviolet (#8A2BE2), ΔE2000 3.3 away.

Relative luminance
0.1343
OKLCH L · C · h
0.541 · 0.247 · 293.0
Best text
White 5.69:1
Hue family
Violet

#7C3AED color codes

HEX
#7C3AED
RGB
rgb(124, 58, 237)
HSL
hsl(262, 83%, 58%)
OKLCH
oklch(0.541 0.247 293.0)
OKLab
oklab(0.541 0.096 -0.227)
CIELAB (D65)
L* 43.40, a* 64.80, b* -79.09
XYZ (D65)
X 25.11, Y 13.42, Z 81.37
CMYK (naive)
cmyk(48%, 76%, 0%, 7%)

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 #7C3AED accessible?

White text on it reaches 5.69:1, passing AA. Black text manages only 3.68: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.68:1

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

    5.69:1

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

    3.68:1

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

    5.69:1

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

Nearest versions that pass 4.5:1

  • For text on white

    #7C3AED 5.69:1

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

  • For text on black

    #8A4DFF 4.58:1

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

Checking another pair? Use the Contrast Checker.

Studio

Adjust #7C3AED 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 #7C3AED

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

  1. 50#F5F3FF
    White
    1.09
    Black
    19.14
  2. 100#EBE8FF
    White
    1.19
    Black
    17.51
  3. 200#D8D0FF
    White
    1.45
    Black
    14.38
  4. 300#C0B0FF
    White
    1.92
    Black
    10.89
  5. 400#A78AFF
    White
    2.71
    Black
    7.72
  6. 500#905EFF
    White
    4.01
    Black
    5.23
  7. 600This color#7C3AED
    White
    5.69
    Black
    3.68
  8. 700#6619CD
    White
    8.12
    Black
    2.58
  9. 800#4B009F
    White
    11.66
    Black
    1.79
  10. 900#31006C
    White
    15.58
    Black
    1.34
  11. 950#1B0042
    White
    18.66
    Black
    1.12

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

Tailwind CSS v3 violet scale

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

  1. 50#F5F3FF
    White
    1.09
    Black
    19.14
  2. 100#EDE9FE
    White
    1.18
    Black
    17.68
  3. 200#DDD6FE
    White
    1.38
    Black
    15.12
  4. 300#C4B5FD
    White
    1.84
    Black
    11.37
  5. 400#A78BFA
    White
    2.72
    Black
    7.71
  6. 500#8B5CF6
    White
    4.23
    Black
    4.95
  7. 600This color#7C3AED
    White
    5.69
    Black
    3.68
  8. 700#6D28D9
    White
    7.10
    Black
    2.95
  9. 800#5B21B6
    White
    8.98
    Black
    2.33
  10. 900#4C1D95
    White
    10.95
    Black
    1.91
  11. 950#2E1065
    White
    15.23
    Black
    1.37

Gamut

How vivid #7C3AED can get

At its lightness and hue, sRGB reaches OKLCH chroma 0.283; #7C3AED uses 87% of it. Display P3, which many recent phones and laptops show, reaches 0.304 there: 7% more.

0.00.20.40.60.80.20.40.60.8 460480500520540560580600620
  • sRGB
  • Display P3
  • Rec. 2020
  • Dominant wavelength
OKLCH chroma
0.247
sRGB edge
0.283
Display P3 edge
0.304
Rec. 2020 edge
0.308
Dominant wavelength
443 nm
Excitation purity
69%
Chromaticity
x 0.2094, y 0.1120
  • This color#7C3AED
  • Most vivid in sRGB#8020FF
  • Most vivid in Display P3oklch(0.541 0.304 293.0)

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

Use the wider color where screens show it
.accent {
  color: #7c3aed;
}
@media (color-gamut: p3) {
  .accent { color: color(display-p3 0.4656 0.0625 1); }
}

Mixing

Mixing #7C3AED

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%#BE9DF6
  • OKLab50%#B7A5FC
  • OKLCH50%#B7A5FC

Black #000000

  • sRGB50%#3E1D77
  • OKLab50%#2C105C
  • OKLCH50%#2C105C

Its complement #707600

  • sRGB50%#765877
  • OKLab50%#706991
  • OKLCH50%#007E87
In CSS
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #7c3aed, white);
color: color-mix(in oklch, #7c3aed 50%, white);

In use

#7C3AED 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.69:1 Passes
  • Link and body-size textText, 4.5:15.69:1 Passes
  • Large headingLarge text, 3:15.69:1 Passes
  • Icons, borders and focus ringsNon-text, 3:15.69:1 Passes

Dark page

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

For text on this page, the nearest shade that passes is #905CFF 4.60:1

Color vision

How #7C3AED looks with color blindness

Achromatopsia changes it most, ΔE2000 31.0; deuteranopia changes it least, 16.4.

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

    #0069F2 ΔE2000 17.5

    Distinct

    Reads as vivid blue

  • Deuteranopia

    No working green (medium-wavelength) cones

    #0063EA ΔE2000 16.4

    Distinct

    Reads as vivid blue

  • Tritanopia

    No working blue (short-wavelength) cones

    #586C92 ΔE2000 18.8

    Distinct

    Reads as muted blue

  • Achromatopsia

    No cone color vision; lightness only

    #676767 ΔE2000 31.0

    Distinct

    Reads as gray

Pairing check

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

VisionThe pairΔE2000Verdict
Normal vision#7C3AED · #70760074.6Stays distinct
Protanopia#0069F2 · #80700062.3Stays distinct
Deuteranopia#0063EA · #80721261.6Stays distinct
Tritanopia#586C92 · #796E6322.0Stays distinct
Achromatopsia#676767 · #7171713.9Easily confused

Harmony

Color harmonies for #7C3AED

Its complement is #707600, a soft yellow.

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

Open the Harmony Studio
  • Base#7C3AED
  • Complement#707600

Complementary

Open in Harmony Studio
  • −30°#145BFB
  • Base#7C3AED
  • +30°#AD13BF
  • Base#7C3AED
  • +120°#AB5300
  • +240°#008269
  • Base#7C3AED
  • +150°#8E6800
  • +210°#00870B

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-violet-600: #7c3aed;
}

Tailwind config

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

Tailwind v4 theme

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

@theme {
  /* v4 has its own violet-600; this pins the v3 value. */
  --color-violet-600: oklch(0.541 0.247 293.0);
}

Design token (W3C DTCG)

{
  "color": {
    "violet-600": {
      "$type": "color",
      "$value": {
        "colorSpace": "srgb",
        "components": [0.4863, 0.2275, 0.9294],
        "hex": "#7c3aed"
      },
      "$description": "Tailwind CSS v3 violet-600"
    }
  }
}

SwiftUI color

import SwiftUI

enum Palette {
    static let violet600 = Color(.sRGB, red: 0.486, green: 0.227, blue: 0.929, opacity: 1)
}

Jetpack Compose color

import androidx.compose.ui.graphics.Color

object Palette {
    val Violet600 = Color(0xFF7C3AED)
}

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 #7C3AED in the tools

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