HSL(304, 42%, 21%)
Purple — Purple color
Adjust Color
Color Information
Color Name
Purple
Color Family
Purple
Warm / Cool
🔴 Warm
Temperature
6500K
CSS Class
bg-[hsl(304,42%,21%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(304, 42%, 21%) | color: hsl(304, 42%, 21%) | |
| HEX | #4C1F49 | color: #4C1F49 | |
| RGB | rgb(76, 31, 73) | color: rgb(76, 31, 73) | |
| CMYK | cmyk(0%, 59%, 4%, 70%) | — | |
| HSV | hsv(304, 59%, 30%) | — | |
| HWB | hwb(304 12% 70%) | color: hwb(304 12% 70%) | |
| OKLCH | oklch(0.3222 0.0908 330.03) | color: oklch(0.3222 0.0908 330.03) | |
| Lab | lab(20.04 27.85 -16.57) | color: lab(20.04 27.85 -16.57) | |
| LCH | lch(20.04 32.41 329.25) | color: lch(20.04 32.41 329.25) |
Color Theory
Accessibility (WCAG)
White text on color
Black text on color
Colored text
Contrast Ratios
AA Normal (4.5:1)
AA Large (3:1)
AAA Normal (7:1)
Best text on this color: white
Color Blindness Simulation
Protanopia (Red-blind)
#39383F — rgb(57, 56, 63)
Deuteranopia (Green-blind)
#3B3F3C — rgb(59, 63, 60)
Tritanopia (Blue-blind)
#4A3735 — rgb(74, 55, 53)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(304, 42%, 21%);
text
color: hsl(304, 42%, 21%);
border
border: 2px solid hsl(304, 42%, 21%);
gradient light
background: linear-gradient(to right, hsl(304, 42%, 41%), hsl(304, 42%, 21%));
gradient dark
background: linear-gradient(to right, hsl(304, 42%, 21%), hsl(304, 42%, 1%))
hex
background-color: #4C1F49;
tailwind
bg-[hsl(304,42%,21%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(304, 42%, 21%, 0.4);
css variable
--color-primary: hsl(304, 42%, 21%);
Related Colors
Use Cases for Purple
Frequently Asked Questions
What are all the color codes for HSL(304, 42%, 21%)?
HEX: #4C1F49 | RGB: rgb(76, 31, 73) | CMYK: 0%, 59%, 4%, 70% | HSV: 304°, 59%, 30%. Copy any format from the conversion table above.
What colors go well with #4C1F49?
The complementary color is HSL(124, 42%, 21%). For a triadic harmony, use hues 304°, 64°, and 184°. For analogous combinations, try hues 274° and 334°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(304, 42%, 21%) in CSS?
As HSL: color: hsl(304, 42%, 21%); — As HEX: color: #4C1F49; — As RGB: color: rgb(76, 31, 73); — Tailwind CSS: bg-[hsl(304,42%,21%)] — CSS variable: --color-primary: hsl(304, 42%, 21%);