Tailwind Violet 400

violet-400 · #A78BFA · rgb(167, 139, 250)

violet-400 is a light vivid violet from the Tailwind CSS default palette, hex code #A78BFA.

HEX#A78BFA
RGBrgb(167, 139, 250)
HSLhsl(255, 92%, 76%)
CMYKcmyk(33%, 44%, 0%, 2%)
CSS variable (v4)var(--color-violet-400)
Color namePeriwinkle (closest)

Classes

bg-violet-400
text-violet-400
border-violet-400
ring-violet-400
from-violet-400 via-violet-400 to-violet-400
bg-violet-400/50   /* 50% opacity */
White text · 2.72:1 · fails
Black text · 7.72:1 · AAA
text-violet-950 · 5.6:1 · AA

Check contrast with any color →

Tailwind violet-400: questions & answers

What is the HEX code of Tailwind violet-400?

Tailwind violet-400 is #A78BFA, which is rgb(167, 139, 250) or hsl(255, 92%, 76%).

How do I use violet-400 as a background in Tailwind?

Add the class bg-violet-400 to the element. Use text-violet-400 for text and border-violet-400 for borders.

What text color works on bg-violet-400?

violet-950 (#2E1065) is the closest shade of the same color with readable contrast (5.6:1). Plain black text gives 7.72:1.