#331eb4
a dark, vivid blue · warm · closest name: navy
RGB
51, 30, 180
HSL
248°, 71%, 41%
CMYK
72, 83, 0, 29
Luminance
0.0493
Every format
| HEX | #331eb4 |
| RGB | rgb(51, 30, 180) |
| HSL | hsl(248, 71%, 41%) |
| CMYK | cmyk(72%, 83%, 0%, 29%) |
| LAB | lab(26.5 53.3 -74.1) |
| LCH | lch(26.5 91.3 305.7) |
| OKLCH | oklch(0.391 0.215 276.0) |
Copy-ready code
/* CSS */
color: #331eb4;
background-color: #331eb4;
/* Tailwind (arbitrary) */
class="text-[#331eb4] bg-[#331eb4]"
/* SCSS */
$brand: #331eb4;
/* SwiftUI */
Color(red: 0.200, green: 0.118, blue: 0.706)
/* Android */
Color.parseColor("#331eb4")Accessibility — WCAG contrast
Aa
#331eb4 on white: 10.58:1
AA ✓ pass · AA-large ✓ · AAA ✓
Aa
#331eb4 on black: 1.99:1
AA ✗ fail · AA-large ✗ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red20.0%
Green11.8%
Blue70.6%
CMYK percentages
Cyan71.7%
Magenta83.3%
Yellow0.0%
Key (black)29.4%
Color previews
#331eb4 text on a black background
contrast 1.99:1
Card sample
#331eb4 text on a white background
contrast 10.58:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #331eb4;
Background color
Panel with #331eb4 background
background-color: #331eb4;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #331eb4;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(51, 30, 180, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 30, 180, 0.45);
Border & gradient
Gradient panel
border: 3px solid #331eb4; background: linear-gradient(135deg, #331eb4, #971EB4);