Skip to content

Tailwind CSS v4 default palette

Tailwind violet-600: #7F22FE

In Tailwind CSS v4, violet-600 is defined as --color-violet-600: oklch(54.1% 0.281 293.009), which is #7F22FE in hex and rgb(127, 34, 254): a medium-dark, vivid violet. In Tailwind v3, violet-600 was #7C3AED.

violet-600#7F22FE

In OKLCH, violet-600 has a lightness of 54.1%, chroma 0.281 and hue 293.0°. It is the most saturated shade of the violet scale.

The value fits inside sRGB, so the hex #7F22FE represents it without loss on any screen.

In v3, violet-600 was #7C3AED. The v4 value is ΔE OK 3.4 away; v4 is more saturated.

Tailwind violet sits between indigo and purple, a popular choice for AI and creative-tool branding.

Color codes for violet-600

Color codes for violet-600
Tailwind v4 token--color-violet-600
OKLCH (source value)oklch(54.1% 0.281 293.009)
HEX#7F22FE
RGBrgb(127, 34, 254)
HSLhsl(265, 99%, 56%)
HWBhwb(265 13% 0%)
CMYK (naive, no ICC profile)cmyk(50%, 87%, 0%, 0%)
Decimal8,332,030
Tailwind v3 hex#7C3AED
Utility classesbg-violet-600, text-violet-600, border-violet-600

Tailwind violet scale

Contrast and accessibility

On violet-600, white text has a contrast ratio of 5.89:1 and passes AA for normal text; black text reaches 3.56: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 violet-6003.56:1FailPassFailFail26.3
White text on violet-6005.89:1PassPassFailPass−83.0
Violet-600 text on white5.89:1PassPassFailPass77.7
Violet-600 text on black3.56:1FailPassFailFail−24.0

Tints and shades

Each step mixes var(--color-violet-600) with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, var(--color-violet-600), white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #852dfe
  2. 15%
    #9243fe
  3. 25%
    #9f59fe
  4. 35%
    #ac6ffe
  5. 45%
    #b985fe
  6. 55%
    #c59cff
  7. 65%
    #d2b2ff
  8. 75%
    #dfc8ff
  9. 85%
    #ecdeff
  10. 95%
    #f9f4ff

Shades (mixed with black)

  1. 5%
    #7920f1
  2. 15%
    #6c1dd8
  3. 25%
    #5f1abf
  4. 35%
    #5316a5
  5. 45%
    #46138c
  6. 55%
    #390f72
  7. 65%
    #2c0c59
  8. 75%
    #200940
  9. 85%
    #130526
  10. 95%
    #06020d

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, violet-600's complementary color is #717600 (close to olive), its analogous colors are #0052FF and #B400C8, and its triadic partners are #B34C00 and #008668. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#717600
Analogous−30°, +30°#0052ff#b400c8
Triadic+120°, +240°#b34c00#008668
Split-complementary+150°, +210°#936600#008a00

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 violet-600 is a cool color: its hue is 265° 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
blueviolet#8a2be25.0
darkviolet#9400d38.6
darkorchid#9932cc9.7

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
purple-600#9810fa5.0
violet-700#7008e75.1
purple-700#8200db6.4

Code snippets

Tailwind CSS
<div class="bg-violet-600 text-white">...</div>
<p class="text-violet-600 border-violet-600">...</p>
CSS
.element {
  color: var(--color-violet-600);
  background-color: oklch(54.1% 0.281 293.009);
  border-color: #7f22fe;
  outline-color: rgb(127 34 254);
}
SwiftUI
import SwiftUI

extension Color {
  static let violet600 = Color(red: 0.498, green: 0.133, blue: 0.996)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const violet600 = Color(0xFF7F22FE);
Android XML
<!-- res/values/colors.xml -->
<color name="violet_600">#7F22FE</color>

Frequently asked questions

What is the hex code for Tailwind violet-600?
In Tailwind CSS v4, violet-600 is oklch(54.1% 0.281 293.009), which converts to #7F22FE (rgb(127, 34, 254)) in sRGB. In Tailwind v3 the same name was #7C3AED.
What is the difference between violet-600 in Tailwind v3 and v4?
v3 used the hex #7C3AED; v4 redefined the palette in OKLCH as oklch(54.1% 0.281 293.009). In v3, violet-600 was #7C3AED. The v4 value is ΔE OK 3.4 away; v4 is more saturated.
How do I use violet-600 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-violet-600). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on violet-600?
White text on violet-600 has a contrast ratio of 5.89:1, which passes AA for normal text but not AAA under WCAG 2.2. Black text reaches 3.56:1 and passes AA only for large text (24 px, or 18.66 px bold, and up). In APCA terms that is Lc −83.0 for white and Lc 26.3 for black.
Which CSS named color is closest to violet-600?
The closest is blueviolet (#8A2BE2) at ΔE OK 5.0, followed by darkviolet and darkorchid.

Last reviewed by Arielton Oberek.