Skip to main content

bg-violet-900

Tailwind Violet 900

#4C1D95·Violet family·Shade 900

Color Values

HEX
#4C1D95
RGB
rgb(76, 29, 149)
HSL
hsl(264, 67%, 35%)
OKLCH
oklch(0.380 0.178 294)
CMYK
cmyk(49%, 81%, 0%, 42%)
CSS Variable
var(--color-violet-900)
Tailwind Class
bg-violet-900

Accessibility Score

60/100

Good

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

On White

10.95:1

AAA

On Black

1.92:1

Fail
Test in Contrast Checker →

Tailwind Usage — All Utilities

Background

bg-violet-900

Text

text-violet-900

Border

border-violet-900

Ring

ring-violet-900

Outline

outline-violet-900

Fill

fill-violet-900

Stroke

stroke-violet-900

From (gradient)

from-violet-900

Via (gradient)

via-violet-900

To (gradient)

to-violet-900

Placeholder

placeholder-violet-900

Caret

caret-violet-900

Accent

accent-violet-900

Decoration

decoration-violet-900

Shadow Color

shadow-violet-900

Tailwind v3 Config (extend custom color)

// tailwind.config.js module.exports = { theme: { extend: { colors: { 'violet-900': '#4c1d95', }, }, }, };

CSS Equivalent

/* Hex */
background-color: #4C1D95;

/* RGB */
background-color: rgb(76, 29, 149);

/* HSL */
background-color: hsl(264, 67%, 35%);

/* OKLCH (CSS Color Level 4) */
background-color: oklch(0.380 0.178 294);

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

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

OKLCH — Modern Color Space

Lightness (L)

0.380

38% perceived brightness

Chroma (C)

0.178

Color intensity / saturation

Hue (H)

294°

Angle on perceptual hue wheel

oklch(0.380 0.178 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

Strong dark tone

Shade 900 of the Violet palette

Recommended Uses

  • Body text on white
  • Dark panel backgrounds
  • Near-dark UI elements
  • Footer backgrounds
  • High-contrast headings

Avoid

On dark backgrounds — contrast will be insufficient.

Preview

On White

Aa Bb Cc

On Black

Aa Bb Cc

As Background

Aa Bb Cc — #4C1D95

Frequently Asked Questions

What is the hex code for Tailwind Violet 900?
Tailwind Violet 900 has the hex code #4C1D95. Its RGB value is rgb(76, 29, 149) and its HSL value is hsl(264, 67%, 35%).
What Tailwind utility classes use Violet 900?
Use bg-violet-900 for backgrounds, text-violet-900 for text color, border-violet-900 for borders, and ring-violet-900 for focus rings. In Tailwind v4 the CSS variable var(--color-violet-900) is available natively.
Is Tailwind Violet 900 WCAG accessible?
Tailwind Violet 900 achieves a 10.95:1 contrast ratio on white (AAA) and 1.92:1 on black (Fail). Its overall accessibility score is 60/100 (Good).
What is the OKLCH value for Tailwind Violet 900?
Tailwind Violet 900 in OKLCH is oklch(0.380 0.178 294) — lightness 0.380, chroma 0.178, hue 294°. OKLCH is a perceptually uniform space supported natively in modern CSS via the `color()` function.
What is Tailwind Violet 900 used for?
At shade 900, Tailwind Violet 900 is best described as "Strong dark tone". Recommended uses: Body text on white, Dark panel backgrounds, Near-dark UI elements.