Skip to content

Tailwind CSS v4 default palette

Tailwind violet-950: #2F0D68

In Tailwind CSS v4, violet-950 is defined as --color-violet-950: oklch(28.3% 0.141 291.089), which is #2F0D68 in hex and rgb(47, 13, 104): a very dark, moderately saturated blue-violet. In Tailwind v3, violet-950 was #2E1065.

violet-950#2F0D68

In OKLCH, violet-950 has a lightness of 28.3%, chroma 0.141 and hue 291.1°.

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

In v3, violet-950 was #2E1065. The v4 value is ΔE OK 0.6 away, below the point where most people can tell them apart; v4 is more saturated.

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

Color codes for violet-950

Color codes for violet-950
Tailwind v4 token--color-violet-950
OKLCH (source value)oklch(28.3% 0.141 291.089)
HEX#2F0D68
RGBrgb(47, 13, 104)
HSLhsl(262, 78%, 23%)
HWBhwb(262 5% 59%)
CMYK (naive, no ICC profile)cmyk(55%, 87%, 0%, 59%)
Decimal3,083,624
Tailwind v3 hex#2E1065
Utility classesbg-violet-950, text-violet-950, border-violet-950

Tailwind violet scale

Contrast and accessibility

On violet-950, white text has a contrast ratio of 15.23:1 and passes AAA at any text size; black text reaches 1.37: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-9501.37:1FailFailFailFail0.0
White text on violet-95015.23:1PassPassPassPass−104.2
Violet-950 text on white15.23:1PassPassPassPass101.3
Violet-950 text on black1.37:1FailFailFailFail0.0

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #391970
  2. 15%
    #4e317f
  3. 25%
    #634a8e
  4. 35%
    #78629d
  5. 45%
    #8d7aac
  6. 55%
    #a192bb
  7. 65%
    #b6aaca
  8. 75%
    #cbc3d9
  9. 85%
    #e0dbe8
  10. 95%
    #f5f3f7

Shades (mixed with black)

  1. 5%
    #2d0c63
  2. 15%
    #280b58
  3. 25%
    #230a4e
  4. 35%
    #1f0844
  5. 45%
    #1a0739
  6. 55%
    #15062f
  7. 65%
    #100524
  8. 75%
    #0c031a
  9. 85%
    #070210
  10. 95%
    #020105

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, violet-950's complementary color is #2C2C00 (close to darkslategray), its analogous colors are #001F6D and #460052, and its triadic partners are #4C1500 and #003524. For text on top, white gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#2c2c00
Analogous−30°, +30°#001f6d#460052
Triadic+120°, +240°#4c1500#003524
Split-complementary+150°, +210°#3d2400#003600

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-950 is a cool color: its hue is 262° 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
midnightblue#1919704.6
indigo#4b00827.4
navy#0000809.0

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
purple-950#3c03663.1
indigo-950#1e1a4d6.0
blue-950#1624566.8

Code snippets

Tailwind CSS
<div class="bg-violet-950 text-white">...</div>
<p class="text-violet-950 border-violet-950">...</p>
CSS
.element {
  color: var(--color-violet-950);
  background-color: oklch(28.3% 0.141 291.089);
  border-color: #2f0d68;
  outline-color: rgb(47 13 104);
}
SwiftUI
import SwiftUI

extension Color {
  static let violet950 = Color(red: 0.184, green: 0.051, blue: 0.408)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const violet950 = Color(0xFF2F0D68);
Android XML
<!-- res/values/colors.xml -->
<color name="violet_950">#2F0D68</color>

Frequently asked questions

What is the hex code for Tailwind violet-950?
In Tailwind CSS v4, violet-950 is oklch(28.3% 0.141 291.089), which converts to #2F0D68 (rgb(47, 13, 104)) in sRGB. In Tailwind v3 the same name was #2E1065.
What is the difference between violet-950 in Tailwind v3 and v4?
v3 used the hex #2E1065; v4 redefined the palette in OKLCH as oklch(28.3% 0.141 291.089). In v3, violet-950 was #2E1065. The v4 value is ΔE OK 0.6 away, below the point where most people can tell them apart; v4 is more saturated.
How do I use violet-950 in plain CSS?
Tailwind v4 defines every palette color as a theme variable, so in CSS you write var(--color-violet-950). By default Tailwind only emits the variables your project uses; @theme static emits all of them.
Can you use white text on violet-950?
White text on violet-950 has a contrast ratio of 15.23:1, which passes both AA and AAA under WCAG 2.2. Black text reaches 1.37:1 and fails AA even for large text. In APCA terms that is Lc −104.2 for white and Lc 0.0 for black.
Which CSS named color is closest to violet-950?
The closest is midnightblue (#191970) at ΔE OK 4.6, followed by indigo and navy.

Last reviewed by Arielton Oberek.