Skip to main content

bg-purple-500

Tailwind Purple 500

#A855F7·Purple family·Shade 500

Color Values

HEX
#A855F7
RGB
rgb(168, 85, 247)
HSL
hsl(271, 91%, 65%)
OKLCH
oklch(0.627 0.233 304)
CMYK
cmyk(32%, 66%, 0%, 3%)
CSS Variable
var(--color-purple-500)
Tailwind Class
bg-purple-500

Accessibility Score

60/100

Good

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

On White

3.96:1

AA Large

On Black

5.31:1

AA
Test in Contrast Checker →

Tailwind Usage — All Utilities

Background

bg-purple-500

Text

text-purple-500

Border

border-purple-500

Ring

ring-purple-500

Outline

outline-purple-500

Fill

fill-purple-500

Stroke

stroke-purple-500

From (gradient)

from-purple-500

Via (gradient)

via-purple-500

To (gradient)

to-purple-500

Placeholder

placeholder-purple-500

Caret

caret-purple-500

Accent

accent-purple-500

Decoration

decoration-purple-500

Shadow Color

shadow-purple-500

Tailwind v3 Config (extend custom color)

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

CSS Equivalent

/* Hex */
background-color: #A855F7;

/* RGB */
background-color: rgb(168, 85, 247);

/* HSL */
background-color: hsl(271, 91%, 65%);

/* OKLCH (CSS Color Level 4) */
background-color: oklch(0.627 0.233 304);

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

/* Gradient example */
background: linear-gradient(135deg, #faf5ff 0%, #9333ea 100%);

OKLCH — Modern Color Space

Lightness (L)

0.627

63% perceived brightness

Chroma (C)

0.233

Color intensity / saturation

Hue (H)

304°

Angle on perceptual hue wheel

oklch(0.627 0.233 304)

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 Purple 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 — #A855F7

Frequently Asked Questions

What is the hex code for Tailwind Purple 500?
Tailwind Purple 500 has the hex code #A855F7. Its RGB value is rgb(168, 85, 247) and its HSL value is hsl(271, 91%, 65%).
What Tailwind utility classes use Purple 500?
Use bg-purple-500 for backgrounds, text-purple-500 for text color, border-purple-500 for borders, and ring-purple-500 for focus rings. In Tailwind v4 the CSS variable var(--color-purple-500) is available natively.
Is Tailwind Purple 500 WCAG accessible?
Tailwind Purple 500 achieves a 3.96:1 contrast ratio on white (AA Large) and 5.31:1 on black (AA). Its overall accessibility score is 60/100 (Good).
What is the OKLCH value for Tailwind Purple 500?
Tailwind Purple 500 in OKLCH is oklch(0.627 0.233 304) — lightness 0.627, chroma 0.233, hue 304°. OKLCH is a perceptually uniform space supported natively in modern CSS via the `color()` function.
What is Tailwind Purple 500 used for?
At shade 500, Tailwind Purple 500 is best described as "Primary brand color". Recommended uses: CTA buttons, Active navigation links, Primary brand accents.