#540df4
a balanced, electric violet · warm · closest name: blue
RGB
84, 13, 244
HSL
258°, 91%, 50%
CMYK
66, 95, 0, 4
Luminance
0.0870
Every format
| HEX | #540df4 |
| RGB | rgb(84, 13, 244) |
| HSL | hsl(258, 91%, 50%) |
| CMYK | cmyk(66%, 95%, 0%, 4%) |
| LAB | lab(35.4 76.4 -96.4) |
| LCH | lch(35.4 123.0 308.4) |
| OKLCH | oklch(0.479 0.283 280.7) |
Copy-ready code
/* CSS */
color: #540df4;
background-color: #540df4;
/* Tailwind (arbitrary) */
class="text-[#540df4] bg-[#540df4]"
/* SCSS */
$brand: #540df4;
/* SwiftUI */
Color(red: 0.329, green: 0.051, blue: 0.957)
/* Android */
Color.parseColor("#540df4")Accessibility — WCAG contrast
Aa
#540df4 on white: 7.66:1
AA ✓ pass · AA-large ✓ · AAA ✓
Aa
#540df4 on black: 2.74:1
AA ✗ fail · AA-large ✗ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red32.9%
Green5.1%
Blue95.7%
CMYK percentages
Cyan65.6%
Magenta94.7%
Yellow0.0%
Key (black)4.3%
Color previews
#540df4 text on a black background
contrast 2.74:1
Card sample
#540df4 text on a white background
contrast 7.66:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #540df4;
Background color
Panel with #540df4 background
background-color: #540df4;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #540df4;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(84, 13, 244, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(84, 13, 244, 0.45);
Border & gradient
Gradient panel
border: 3px solid #540df4; background: linear-gradient(135deg, #540df4, #EE0DF4);