Skip to content

Tailwind CSS v4 default palette

Tailwind violet-800: #5D0EC0

In Tailwind CSS v4, violet-800 is defined as --color-violet-800: oklch(43.2% 0.232 292.759), which is #5D0EC0 in hex and rgb(93, 14, 192): a dark, vivid violet. In Tailwind v3, violet-800 was #5B21B6.

violet-800#5D0EC0

In OKLCH, violet-800 has a lightness of 43.2%, chroma 0.232 and hue 292.8°.

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

In v3, violet-800 was #5B21B6. The v4 value is ΔE OK 2.1 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-800

Color codes for violet-800
Tailwind v4 token--color-violet-800
OKLCH (source value)oklch(43.2% 0.232 292.759)
HEX#5D0EC0
RGBrgb(93, 14, 192)
HSLhsl(267, 86%, 40%)
HWBhwb(267 5% 25%)
CMYK (naive, no ICC profile)cmyk(52%, 93%, 0%, 25%)
Decimal6,098,624
Tailwind v3 hex#5B21B6
Utility classesbg-violet-800, text-violet-800, border-violet-800

Tailwind violet scale

Contrast and accessibility

On violet-800, white text has a contrast ratio of 9.17:1 and passes AAA at any text size; black text reaches 2.28: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-8002.28:1FailFailFailFail14.8
White text on violet-8009.17:1PassPassPassPass−93.8
Violet-800 text on white9.17:1PassPassPassPass89.2
Violet-800 text on black2.28:1FailFailFailFail−13.0

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #651ac3
  2. 15%
    #7532c9
  3. 25%
    #864ad0
  4. 35%
    #9662d6
  5. 45%
    #a67adc
  6. 55%
    #b693e3
  7. 65%
    #c6abe9
  8. 75%
    #d7c3ef
  9. 85%
    #e7dbf6
  10. 95%
    #f7f3fc

Shades (mixed with black)

  1. 5%
    #580db6
  2. 15%
    #4f0ca3
  3. 25%
    #460b90
  4. 35%
    #3c097d
  5. 45%
    #33086a
  6. 55%
    #2a0656
  7. 65%
    #210543
  8. 75%
    #170430
  9. 85%
    #0e021d
  10. 95%
    #05010a

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, violet-800's complementary color is #525600 (close to darkolivegreen), its analogous colors are #0038CC and #850095, and its triadic partners are #863400 and #00624A. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#525600
Analogous−30°, +30°#0038cc#850095
Triadic+120°, +240°#863400#00624a
Split-complementary+150°, +210°#6d4900#006500

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-800 is a cool color: its hue is 267° 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
rebeccapurple#6633998.1
blueviolet#8a2be211.0
darkslateblue#483d8b11.0

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
purple-800#6e11b04.6
violet-900#4d179a6.8
indigo-700#432dd77.0

Code snippets

Tailwind CSS
<div class="bg-violet-800 text-white">...</div>
<p class="text-violet-800 border-violet-800">...</p>
CSS
.element {
  color: var(--color-violet-800);
  background-color: oklch(43.2% 0.232 292.759);
  border-color: #5d0ec0;
  outline-color: rgb(93 14 192);
}
SwiftUI
import SwiftUI

extension Color {
  static let violet800 = Color(red: 0.365, green: 0.055, blue: 0.753)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const violet800 = Color(0xFF5D0EC0);
Android XML
<!-- res/values/colors.xml -->
<color name="violet_800">#5D0EC0</color>

Frequently asked questions

What is the hex code for Tailwind violet-800?
In Tailwind CSS v4, violet-800 is oklch(43.2% 0.232 292.759), which converts to #5D0EC0 (rgb(93, 14, 192)) in sRGB. In Tailwind v3 the same name was #5B21B6.
What is the difference between violet-800 in Tailwind v3 and v4?
v3 used the hex #5B21B6; v4 redefined the palette in OKLCH as oklch(43.2% 0.232 292.759). In v3, violet-800 was #5B21B6. The v4 value is ΔE OK 2.1 away; v4 is more saturated.
How do I use violet-800 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-violet-800). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on violet-800?
White text on violet-800 has a contrast ratio of 9.17:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 2.28:1 and fails AA even for large text. In APCA terms that is Lc −93.8 for white and Lc 14.8 for black.
Which CSS named color is closest to violet-800?
The closest is rebeccapurple (#663399) at ΔE OK 8.1, followed by blueviolet and darkslateblue.

Last reviewed by Arielton Oberek.