Skip to main content

bg-violet-300

Tailwind Violet 300

#C4B5FD·Violet family·Shade 300

Color Values

HEX
#C4B5FD
RGB
rgb(196, 181, 253)
HSL
hsl(252, 95%, 85%)
OKLCH
oklch(0.811 0.101 294)
CMYK
cmyk(23%, 28%, 0%, 1%)
CSS Variable
var(--color-violet-300)
Tailwind Class
bg-violet-300

Accessibility Score

60/100

Good

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

On White

1.85:1

Fail

On Black

11.38:1

AAA
Test in Contrast Checker →

Tailwind Usage — All Utilities

Background

bg-violet-300

Text

text-violet-300

Border

border-violet-300

Ring

ring-violet-300

Outline

outline-violet-300

Fill

fill-violet-300

Stroke

stroke-violet-300

From (gradient)

from-violet-300

Via (gradient)

via-violet-300

To (gradient)

to-violet-300

Placeholder

placeholder-violet-300

Caret

caret-violet-300

Accent

accent-violet-300

Decoration

decoration-violet-300

Shadow Color

shadow-violet-300

Tailwind v3 Config (extend custom color)

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

CSS Equivalent

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

/* RGB */
background-color: rgb(196, 181, 253);

/* HSL */
background-color: hsl(252, 95%, 85%);

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

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

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

OKLCH — Modern Color Space

Lightness (L)

0.811

81% perceived brightness

Chroma (C)

0.101

Color intensity / saturation

Hue (H)

294°

Angle on perceptual hue wheel

oklch(0.811 0.101 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

Light mid-tone accent

Shade 300 of the Violet palette

Recommended Uses

  • Secondary button outlines
  • Icon strokes on dark backgrounds
  • Progress bar fills
  • Selected state highlights

Avoid

Normal-size text on white — generally below WCAG AA threshold.

Preview

On White

Aa Bb Cc

On Black

Aa Bb Cc

As Background

Aa Bb Cc — #C4B5FD

Frequently Asked Questions

What is the hex code for Tailwind Violet 300?
Tailwind Violet 300 has the hex code #C4B5FD. Its RGB value is rgb(196, 181, 253) and its HSL value is hsl(252, 95%, 85%).
What Tailwind utility classes use Violet 300?
Use bg-violet-300 for backgrounds, text-violet-300 for text color, border-violet-300 for borders, and ring-violet-300 for focus rings. In Tailwind v4 the CSS variable var(--color-violet-300) is available natively.
Is Tailwind Violet 300 WCAG accessible?
Tailwind Violet 300 achieves a 1.85:1 contrast ratio on white (Fail) and 11.38:1 on black (AAA). Its overall accessibility score is 60/100 (Good).
What is the OKLCH value for Tailwind Violet 300?
Tailwind Violet 300 in OKLCH is oklch(0.811 0.101 294) — lightness 0.811, chroma 0.101, hue 294°. OKLCH is a perceptually uniform space supported natively in modern CSS via the `color()` function.
What is Tailwind Violet 300 used for?
At shade 300, Tailwind Violet 300 is best described as "Light mid-tone accent". Recommended uses: Secondary button outlines, Icon strokes on dark backgrounds, Progress bar fills.