#331f3d
a deep, soft violet · warm · closest name: black
RGB
51, 31, 61
HSL
280°, 33%, 18%
CMYK
16, 49, 0, 76
Luminance
0.0202
Every format
| HEX | #331f3d |
| RGB | rgb(51, 31, 61) |
| HSL | hsl(280, 33%, 18%) |
| CMYK | cmyk(16%, 49%, 0%, 76%) |
| LAB | lab(15.6 16.3 -15.5) |
| LCH | lch(15.6 22.5 316.5) |
| OKLCH | oklch(0.279 0.059 313.7) |
Copy-ready code
/* CSS */
color: #331f3d;
background-color: #331f3d;
/* Tailwind (arbitrary) */
class="text-[#331f3d] bg-[#331f3d]"
/* SCSS */
$brand: #331f3d;
/* SwiftUI */
Color(red: 0.200, green: 0.122, blue: 0.239)
/* Android */
Color.parseColor("#331f3d")Accessibility — WCAG contrast
Aa
#331f3d on white: 14.96:1
AA ✓ pass · AA-large ✓ · AAA ✓
Aa
#331f3d on black: 1.40:1
AA ✗ fail · AA-large ✗ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red20.0%
Green12.2%
Blue23.9%
CMYK percentages
Cyan16.4%
Magenta49.2%
Yellow0.0%
Key (black)76.1%
Color previews
#331f3d text on a black background
contrast 1.40:1
Card sample
#331f3d text on a white background
contrast 14.96:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #331f3d;
Background color
Panel with #331f3d background
background-color: #331f3d;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #331f3d;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(51, 31, 61, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 31, 61, 0.45);
Border & gradient
Gradient panel
border: 3px solid #331f3d; background: linear-gradient(135deg, #331f3d, #3D1F33);