Tailwind CSS v3 color
Tailwind violet-400 #A78BFA
Tailwind CSS v3's violet-400 is #A78BFA. It is a light soft violet in the violet family. In OKLCH it sits at lightness 0.709, chroma 0.159 and hue 293.5°. The nearest CSS named color is mediumpurple (#9370DB), ΔE2000 8.7 away.
- Relative luminance
- 0.3358
- OKLCH L · C · h
- 0.709 · 0.159 · 293.5
- Best text
- Black 7.71:1
- Hue family
- Violet
#A78BFA color codes
- HEX
#A78BFA- RGB
rgb(167, 139, 250)- HSL
hsl(255, 92%, 76%)- OKLCH
oklch(0.709 0.159 293.5)- OKLab
oklab(0.709 0.064 -0.146)- CIELAB (D65)
L* 64.63, a* 34.56, b* -51.87- XYZ (D65)
X 42.42, Y 33.58, Z 94.67- CMYK (naive)
cmyk(33%, 44%, 0%, 2%)
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 #A78BFA accessible?
Black text on it reaches 7.71:1, passing AAA. White text fails at 2.72:1.
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
7.71:1
- AA passes
- AA large passes
- AAA passes
- APCA Lc +51
-
White text on it
2.72:1
- AA fails
- AA large fails
- AAA fails
- APCA Lc −57
-
As text on black
7.71:1
- AA passes
- AA large passes
- AAA passes
- APCA Lc −49
-
As text on white
2.72:1
- AA fails
- AA large fails
- AAA fails
- APCA Lc +52
Nearest versions that pass 4.5:1
-
For text on white
#8063CE 4.57:1
Darkening its OKLCH lightness from 0.71 to 0.58 reaches 4.57:1 on white, keeping the hue.
-
For text on black
#A78BFA 7.71:1
It already reaches 7.71:1 on black, so no change is needed.
Checking another pair? Use the Contrast Checker.
Studio
Adjust #A78BFA 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.
Scale
Shades and tints of #A78BFA
Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #A78BFA sits at step 400.
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.
Gamut
How vivid #A78BFA can get
At its lightness and hue, sRGB reaches OKLCH chroma 0.169; #A78BFA uses 94% of it. Display P3, which many recent phones and laptops show, reaches 0.183 there: 9% more.
- sRGB
- Display P3
- Rec. 2020
- Dominant wavelength
- OKLCH chroma
- 0.159
- sRGB edge
- 0.169
- Display P3 edge
- 0.183
- Rec. 2020 edge
- 0.186
- Dominant wavelength
- 446 nm
- Excitation purity
- 42%
- Chromaticity
- x 0.2485, y 0.1968
- This color#A78BFA
- Most vivid in sRGB#A889FF
- Most vivid in Display P3oklch(0.709 0.183 293.5)
On a screen without Display P3 the last tile shows the sRGB edge instead.
.accent {
color: #a78bfa;
}
@media (color-gamut: p3) {
.accent { color: color(display-p3 0.6396 0.5305 1); }
}
Mixing
Mixing #A78BFA
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%#D3C5FD
- OKLab50%#D1C6FF
- OKLCH50%#D1C6FF
Black #000000
- sRGB50%#54467D
- OKLab50%#3E3261
- OKLCH50%#3E3261
Its complement #A2AB00
- sRGB50%#A59B7D
- OKLab50%#A1A1A1
- OKLCH50%#F47470
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #a78bfa, white);
color: color-mix(in oklch, #a78bfa 50%, white);
In use
#A78BFA 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:17.71:1 Passes
- Link and body-size textText, 4.5:12.72:1 Fails
- Large headingLarge text, 3:12.72:1 Fails
- Icons, borders and focus ringsNon-text, 3:12.72:1 Fails
For text on this page, the nearest shade that passes is #8063CE 4.57:1
Dark page
- Button labelText, 4.5:17.71:1 Passes
- Link and body-size textText, 4.5:16.88:1 Passes
- Large headingLarge text, 3:16.88:1 Passes
- Icons, borders and focus ringsNon-text, 3:16.88:1 Passes
Color vision
How #A78BFA looks with color blindness
Achromatopsia changes it most, ΔE2000 26.1; tritanopia changes it least, 13.3.
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
#679EFE ΔE2000 16.2
Distinct
Reads as light soft blue
-
Deuteranopia
No working green (medium-wavelength) cones
#6B9BF7 ΔE2000 15.1
Distinct
Reads as light soft blue
-
Tritanopia
No working blue (short-wavelength) cones
#94A0B7 ΔE2000 13.3
Distinct
Reads as light grayish blue
-
Achromatopsia
No cone color vision; lightness only
#9D9D9D ΔE2000 26.1
Distinct
Reads as gray
Pairing check
Checked against its complement, #A2AB00. Their lightness contrast is only 1.08:1, so where hue collapses, add a label, icon or pattern.
| Vision | The pair | ΔE2000 | Verdict |
|---|---|---|---|
| Normal vision | #A78BFA · #A2AB00 | 70.4 | Stays distinct |
| Protanopia | #679EFE · #B9A200 | 58.5 | Stays distinct |
| Deuteranopia | #6B9BF7 · #B9A51E | 57.5 | Stays distinct |
| Tritanopia | #94A0B7 · #AEA091 | 18.4 | Stays distinct |
| Achromatopsia | #9D9D9D · #A3A3A3 | 1.8 | Easily confused |
Harmony
Color harmonies for #A78BFA
Its complement is #A2AB00, a light soft yellow.
Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.
Open the Harmony Studio- Base#A78BFA
- Complement#A2AB00
Complementary
Open in Harmony Studio- −30°#6F9EFF
- Base#A78BFA
- +30°#D07CD9
Analogous
Open in Harmony Studio- Base#A78BFA
- +120°#EC812F
- +240°#00BC9A
Triadic
Open in Harmony Studio- Base#A78BFA
- +150°#CC9700
- +210°#5CBA5B
Split-complementary
Open in Harmony StudioCode
Design tokens
Ready-to-paste tokens in six formats. Rename them to fit your system.
:root {
--color-violet-400: #a78bfa;
}
// tailwind.config.js — already built in as violet-400;
// pin the v3 value explicitly like this:
module.exports = {
theme: {
extend: {
colors: {
violet: { 400: '#a78bfa' },
},
},
},
};
/* app.css — Tailwind CSS v4 */
@import "tailwindcss";
@theme {
/* v4 has its own violet-400; this pins the v3 value. */
--color-violet-400: oklch(0.709 0.159 293.5);
}
{
"color": {
"violet-400": {
"$type": "color",
"$value": {
"colorSpace": "srgb",
"components": [0.6549, 0.5451, 0.9804],
"hex": "#a78bfa"
},
"$description": "Tailwind CSS v3 violet-400"
}
}
}
import SwiftUI
enum Palette {
static let violet400 = Color(.sRGB, red: 0.655, green: 0.545, blue: 0.980, opacity: 1)
}
import androidx.compose.ui.graphics.Color
object Palette {
val Violet400 = Color(0xFFA78BFA)
}
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 #A78BFA in the tools
Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.
- Color InspectorEvery format, its names, contrast and color vision in one panel.
- Contrast SystemBlack and white text on this color, with fixes in both directions.
- Harmony StudioPalettes built from this color, walked to a contrast target if you ask.
- Color Space ConverterThe same color in 34 notations, with its gamut headroom.
- Color Name FinderThe nearest of 1,055 color names by ΔE2000.