Color Values
- HEX
- #A78BFA
- RGB
- rgb(167, 139, 250)
- HSL
- hsl(255, 92%, 76%)
- OKLCH
- oklch(0.709 0.159 294)
- CMYK
- cmyk(33%, 44%, 0%, 2%)
- CSS Variable
- var(--color-violet-400)
- Tailwind Class
- bg-violet-400
Accessibility Score
Good
Based on WCAG 2.1 contrast ratios against white and black backgrounds.
On White
2.72:1
On Black
7.72:1
Tailwind Usage — All Utilities
Background
bg-violet-400Text
text-violet-400Border
border-violet-400Ring
ring-violet-400Outline
outline-violet-400Fill
fill-violet-400Stroke
stroke-violet-400From (gradient)
from-violet-400Via (gradient)
via-violet-400To (gradient)
to-violet-400Placeholder
placeholder-violet-400Caret
caret-violet-400Accent
accent-violet-400Decoration
decoration-violet-400Shadow Color
shadow-violet-400Tailwind v3 Config (extend custom color)
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
'violet-400': '#a78bfa',
},
},
},
};CSS Equivalent
/* Hex */
background-color: #A78BFA;
/* RGB */
background-color: rgb(167, 139, 250);
/* HSL */
background-color: hsl(255, 92%, 76%);
/* OKLCH (CSS Color Level 4) */
background-color: oklch(0.709 0.159 294);
/* CSS Custom Property (Tailwind v4) */
background-color: var(--color-violet-400);
/* Gradient example */
background: linear-gradient(135deg, #f5f3ff 0%, #8b5cf6 100%);OKLCH — Modern Color Space
Lightness (L)
0.709
71% perceived brightness
Chroma (C)
0.159
Color intensity / saturation
Hue (H)
294°
Angle on perceptual hue wheel
oklch(0.709 0.159 294)OKLCH is a perceptually uniform color space in CSS Color Level 4. Unlike HSL, equal steps in L produce equal perceived lightness changes — making it ideal for building accessible, harmonious design system scales.
Design Recommendations
Mid-tone accent
Shade 400 of the Violet palette
Recommended Uses
- ✓Icon fills on white
- ✓Secondary buttons (large text)
- ✓Chart & data visualization bars
- ✓Decorative UI elements
Avoid
Preview
On White
Aa Bb Cc
On Black
Aa Bb Cc
As Background
Aa Bb Cc — #A78BFA
Similar Tailwind Colors
Perceptually close shades from other Tailwind color families.
Nearest Named Color
Tailwind Violet 400
Nearest Tailwind equivalent — #A78BFA
Frequently Asked Questions
- What is the hex code for Tailwind Violet 400?
- Tailwind Violet 400 has the hex code #A78BFA. Its RGB value is rgb(167, 139, 250) and its HSL value is hsl(255, 92%, 76%).
- What Tailwind utility classes use Violet 400?
- Use bg-violet-400 for backgrounds, text-violet-400 for text color, border-violet-400 for borders, and ring-violet-400 for focus rings. In Tailwind v4 the CSS variable var(--color-violet-400) is available natively.
- Is Tailwind Violet 400 WCAG accessible?
- Tailwind Violet 400 achieves a 2.72:1 contrast ratio on white (Fail) and 7.72:1 on black (AAA). Its overall accessibility score is 60/100 (Good).
- What is the OKLCH value for Tailwind Violet 400?
- Tailwind Violet 400 in OKLCH is oklch(0.709 0.159 294) — lightness 0.709, chroma 0.159, hue 294°. OKLCH is a perceptually uniform space supported natively in modern CSS via the `color()` function.
- What is Tailwind Violet 400 used for?
- At shade 400, Tailwind Violet 400 is best described as "Mid-tone accent". Recommended uses: Icon fills on white, Secondary buttons (large text), Chart & data visualization bars.