Skip to main content

bg-violet-500

Tailwind Violet 500

#8B5CF6·Violet family·Shade 500

Color Values

HEX
#8B5CF6
RGB
rgb(139, 92, 246)
HSL
hsl(258, 90%, 66%)
OKLCH
oklch(0.606 0.219 293)
CMYK
cmyk(43%, 63%, 0%, 4%)
CSS Variable
var(--color-violet-500)
Tailwind Class
bg-violet-500

Accessibility Score

60/100

Good

Based on WCAG 2.1 contrast ratios against white and black backgrounds.

On White

4.23:1

AA Large

On Black

4.96:1

AA
Test in Contrast Checker →

Tailwind Usage — All Utilities

Background

bg-violet-500

Text

text-violet-500

Border

border-violet-500

Ring

ring-violet-500

Outline

outline-violet-500

Fill

fill-violet-500

Stroke

stroke-violet-500

From (gradient)

from-violet-500

Via (gradient)

via-violet-500

To (gradient)

to-violet-500

Placeholder

placeholder-violet-500

Caret

caret-violet-500

Accent

accent-violet-500

Decoration

decoration-violet-500

Shadow Color

shadow-violet-500

Tailwind v3 Config (extend custom color)

// tailwind.config.js module.exports = { theme: { extend: { colors: { 'violet-500': '#8b5cf6', }, }, }, };

CSS Equivalent

/* Hex */
background-color: #8B5CF6;

/* RGB */
background-color: rgb(139, 92, 246);

/* HSL */
background-color: hsl(258, 90%, 66%);

/* OKLCH (CSS Color Level 4) */
background-color: oklch(0.606 0.219 293);

/* CSS Custom Property (Tailwind v4) */
background-color: var(--color-violet-500);

/* Gradient example */
background: linear-gradient(135deg, #f5f3ff 0%, #7c3aed 100%);

OKLCH — Modern Color Space

Lightness (L)

0.606

61% perceived brightness

Chroma (C)

0.219

Color intensity / saturation

Hue (H)

293°

Angle on perceptual hue wheel

oklch(0.606 0.219 293)

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

Primary brand color

Shade 500 of the Violet palette

Recommended Uses

  • CTA buttons
  • Active navigation links
  • Primary brand accents
  • Interactive element fills
  • Highlighted badges

Avoid

Text on dark/black backgrounds — check contrast before use.

Preview

On White

Aa Bb Cc

On Black

Aa Bb Cc

As Background

Aa Bb Cc — #8B5CF6

Frequently Asked Questions

What is the hex code for Tailwind Violet 500?
Tailwind Violet 500 has the hex code #8B5CF6. Its RGB value is rgb(139, 92, 246) and its HSL value is hsl(258, 90%, 66%).
What Tailwind utility classes use Violet 500?
Use bg-violet-500 for backgrounds, text-violet-500 for text color, border-violet-500 for borders, and ring-violet-500 for focus rings. In Tailwind v4 the CSS variable var(--color-violet-500) is available natively.
Is Tailwind Violet 500 WCAG accessible?
Tailwind Violet 500 achieves a 4.23:1 contrast ratio on white (AA Large) and 4.96:1 on black (AA). Its overall accessibility score is 60/100 (Good).
What is the OKLCH value for Tailwind Violet 500?
Tailwind Violet 500 in OKLCH is oklch(0.606 0.219 293) — lightness 0.606, chroma 0.219, hue 293°. OKLCH is a perceptually uniform space supported natively in modern CSS via the `color()` function.
What is Tailwind Violet 500 used for?
At shade 500, Tailwind Violet 500 is best described as "Primary brand color". Recommended uses: CTA buttons, Active navigation links, Primary brand accents.