Tailwind CSS v3.4 color family

Tailwind violet 11 shades, 50 to 950

Violet is one of the 22 color families in Tailwind CSS v3.4, with eleven shades from 50 to 950. Its 500 shade, #8B5CF6, sits at OKLCH hue 292.7°. Lightness runs from 0.969 at 50 to 0.283 at 950.

500 shade
#8B5CF6
OKLCH hue at 500
292.7°
Body text on white
600 to 950
Body text on black
50 to 500

Tailwind CSS 4.3.3

violet: current colors

11 shades with exact official OKLCH values. Use bg-violet-500, text-violet-500 or border-violet-500 in Tailwind. Wide-gamut colors are preserved; these are not the v3 hex values.

ColorExact OKLCHCSS variable
violet-50oklch(96.9% 0.016 293.756)--color-violet-50
violet-100oklch(94.3% 0.029 294.588)--color-violet-100
violet-200oklch(89.4% 0.057 293.283)--color-violet-200
violet-300oklch(81.1% 0.111 293.571)--color-violet-300
violet-400oklch(70.2% 0.183 293.541)--color-violet-400
violet-500oklch(60.6% 0.25 292.717)--color-violet-500
violet-600oklch(54.1% 0.281 293.009)--color-violet-600
violet-700oklch(49.1% 0.27 292.581)--color-violet-700
violet-800oklch(43.2% 0.232 292.759)--color-violet-800
violet-900oklch(38% 0.189 293.745)--color-violet-900
violet-950oklch(28.3% 0.141 291.089)--color-violet-950

Source: Tailwind CSS 4.3.3 theme.css (MIT). Values are pinned to this release. Older v3 reference values below are kept separately for existing projects.

Scale

Every shade, 50 to 950

Each shade has a page of its own. Under each, white and black text on it; a bold figure passes 4.5:1.

  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. 600#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

Values

Hex, RGB and OKLCH values

The Tailwind CSS v3.4 values, with the contrast of white and black text on each shade.

ShadeHEXRGBOKLCHWhite textBlack text
violet-50#F5F3FFrgb(245, 243, 255)oklch(0.969 0.016 293.8)1.0919.14
violet-100#EDE9FErgb(237, 233, 254)oklch(0.943 0.028 294.6)1.1817.68
violet-200#DDD6FErgb(221, 214, 254)oklch(0.894 0.055 293.3)1.3815.12
violet-300#C4B5FDrgb(196, 181, 253)oklch(0.811 0.101 293.6)1.8411.37
violet-400#A78BFArgb(167, 139, 250)oklch(0.709 0.159 293.5)2.727.71
violet-500#8B5CF6rgb(139, 92, 246)oklch(0.606 0.219 292.7)4.234.95
violet-600#7C3AEDrgb(124, 58, 237)oklch(0.541 0.247 293.0)5.693.68
violet-700#6D28D9rgb(109, 40, 217)oklch(0.491 0.241 292.6)7.102.95
violet-800#5B21B6rgb(91, 33, 182)oklch(0.432 0.211 292.8)8.982.33
violet-900#4C1D95rgb(76, 29, 149)oklch(0.380 0.178 293.7)10.951.91
violet-950#2E1065rgb(46, 16, 101)oklch(0.283 0.135 291.1)15.231.37

Legibility

Which shades pass on each other

Every shade as text on every other shade. 36 of 110 pairings pass 4.5:1 for body text, and 18 more pass 3:1 for large text.

Text shade, then background shade50100200300400500600700800900950
50same shade1.081.261.682.483.865.196.478.189.9813.89
1001.08same shade1.161.552.293.564.795.987.569.2212.83
2001.261.16same shade1.321.953.044.105.116.467.8810.97
3001.681.551.32same shade1.472.293.083.844.865.938.25
4002.482.291.951.47same shade1.552.092.613.304.025.59
5003.863.563.042.291.55same shade1.341.672.122.583.59
6005.194.794.103.082.091.34same shade1.241.571.922.67
7006.475.985.113.842.611.671.24same shade1.261.542.14
8008.187.566.464.863.302.121.571.26same shade1.211.69
9009.989.227.885.934.022.581.921.541.21same shade1.39
95013.8912.8310.978.255.593.592.672.141.691.39same shade

Rows are the text shade, columns the background. A bold figure on a tinted cell passes 4.5:1 for body text; a plain one passes 3:1 for large text only; a faint one fails.

Color vision

The scale with color blindness

The same eleven shades as seen with each color vision deficiency. Lightness keeps a ramp in order even where its hue collapses.

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

What each type sees
  • Typical vision

    Closest neighbors: 50 and 100, ΔE2000 4.2

  • Protanopia

    Closest neighbors: 50 and 100, ΔE2000 3.7

  • Deuteranopia

    Closest neighbors: 50 and 100, ΔE2000 3.4

  • Tritanopia

    Closest neighbors: 50 and 100, ΔE2000 2.1

  • Achromatopsia

    Closest neighbors: 50 and 100, ΔE2000 1.9

Code

Design tokens

The whole family in six formats, ready to paste.

CSS custom properties

:root {
  --color-violet-50: #f5f3ff;
  --color-violet-100: #ede9fe;
  --color-violet-200: #ddd6fe;
  --color-violet-300: #c4b5fd;
  --color-violet-400: #a78bfa;
  --color-violet-500: #8b5cf6;
  --color-violet-600: #7c3aed;
  --color-violet-700: #6d28d9;
  --color-violet-800: #5b21b6;
  --color-violet-900: #4c1d95;
  --color-violet-950: #2e1065;
}

Tailwind config

// tailwind.config.js — violet is built in; this pins the v3.4 values.
module.exports = {
  theme: {
    extend: {
      colors: {
        violet: {
          50: '#f5f3ff',
          100: '#ede9fe',
          200: '#ddd6fe',
          300: '#c4b5fd',
          400: '#a78bfa',
          500: '#8b5cf6',
          600: '#7c3aed',
          700: '#6d28d9',
          800: '#5b21b6',
          900: '#4c1d95',
          950: '#2e1065',
        },
      },
    },
  },
};

Tailwind v4 theme

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

@theme {
  /* v4 has its own violet; these pin the v3 values. */
  --color-violet-50: oklch(0.969 0.016 293.8);
  --color-violet-100: oklch(0.943 0.028 294.6);
  --color-violet-200: oklch(0.894 0.055 293.3);
  --color-violet-300: oklch(0.811 0.101 293.6);
  --color-violet-400: oklch(0.709 0.159 293.5);
  --color-violet-500: oklch(0.606 0.219 292.7);
  --color-violet-600: oklch(0.541 0.247 293.0);
  --color-violet-700: oklch(0.491 0.241 292.6);
  --color-violet-800: oklch(0.432 0.211 292.8);
  --color-violet-900: oklch(0.380 0.178 293.7);
  --color-violet-950: oklch(0.283 0.135 291.1);
}

Design tokens (W3C DTCG)

{
  "color": {
    "violet": {
      "50": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.9608, 0.9529, 1],
          "hex": "#f5f3ff"
        }
      },
      "100": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.9294, 0.9137, 0.9961],
          "hex": "#ede9fe"
        }
      },
      "200": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.8667, 0.8392, 0.9961],
          "hex": "#ddd6fe"
        }
      },
      "300": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.7686, 0.7098, 0.9922],
          "hex": "#c4b5fd"
        }
      },
      "400": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.6549, 0.5451, 0.9804],
          "hex": "#a78bfa"
        }
      },
      "500": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.5451, 0.3608, 0.9647],
          "hex": "#8b5cf6"
        }
      },
      "600": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.4863, 0.2275, 0.9294],
          "hex": "#7c3aed"
        }
      },
      "700": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.4275, 0.1569, 0.851],
          "hex": "#6d28d9"
        }
      },
      "800": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.3569, 0.1294, 0.7137],
          "hex": "#5b21b6"
        }
      },
      "900": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.298, 0.1137, 0.5843],
          "hex": "#4c1d95"
        }
      },
      "950": {
        "$type": "color",
        "$value": {
          "colorSpace": "srgb",
          "components": [0.1804, 0.0627, 0.3961],
          "hex": "#2e1065"
        }
      }
    }
  }
}

SwiftUI colors

import SwiftUI

enum Palette {
    static let violet50 = Color(.sRGB, red: 0.961, green: 0.953, blue: 1.000, opacity: 1)
    static let violet100 = Color(.sRGB, red: 0.929, green: 0.914, blue: 0.996, opacity: 1)
    static let violet200 = Color(.sRGB, red: 0.867, green: 0.839, blue: 0.996, opacity: 1)
    static let violet300 = Color(.sRGB, red: 0.769, green: 0.710, blue: 0.992, opacity: 1)
    static let violet400 = Color(.sRGB, red: 0.655, green: 0.545, blue: 0.980, opacity: 1)
    static let violet500 = Color(.sRGB, red: 0.545, green: 0.361, blue: 0.965, opacity: 1)
    static let violet600 = Color(.sRGB, red: 0.486, green: 0.227, blue: 0.929, opacity: 1)
    static let violet700 = Color(.sRGB, red: 0.427, green: 0.157, blue: 0.851, opacity: 1)
    static let violet800 = Color(.sRGB, red: 0.357, green: 0.129, blue: 0.714, opacity: 1)
    static let violet900 = Color(.sRGB, red: 0.298, green: 0.114, blue: 0.584, opacity: 1)
    static let violet950 = Color(.sRGB, red: 0.180, green: 0.063, blue: 0.396, opacity: 1)
}

Jetpack Compose colors

import androidx.compose.ui.graphics.Color

object Palette {
    val Violet50 = Color(0xFFF5F3FF)
    val Violet100 = Color(0xFFEDE9FE)
    val Violet200 = Color(0xFFDDD6FE)
    val Violet300 = Color(0xFFC4B5FD)
    val Violet400 = Color(0xFFA78BFA)
    val Violet500 = Color(0xFF8B5CF6)
    val Violet600 = Color(0xFF7C3AED)
    val Violet700 = Color(0xFF6D28D9)
    val Violet800 = Color(0xFF5B21B6)
    val Violet900 = Color(0xFF4C1D95)
    val Violet950 = Color(0xFF2E1065)
}

Families

Other Tailwind families

The rest of the Tailwind CSS v3.4 palette, in the order Tailwind lists it.