#8c40df
a balanced, vivid violet · warm · closest name: slateblue
RGB
140, 64, 223
HSL
269°, 71%, 56%
CMYK
37, 71, 0, 13
Luminance
0.1457
Every format
| HEX | #8c40df |
| RGB | rgb(140, 64, 223) |
| HSL | hsl(269, 71%, 56%) |
| CMYK | cmyk(37%, 71%, 0%, 13%) |
| LAB | lab(45.0 61.3 -68.4) |
| LCH | lch(45.0 91.9 311.9) |
| OKLCH | oklch(0.554 0.227 300.9) |
Copy-ready code
/* CSS */
color: #8c40df;
background-color: #8c40df;
/* Tailwind (arbitrary) */
class="text-[#8c40df] bg-[#8c40df]"
/* SCSS */
$brand: #8c40df;
/* SwiftUI */
Color(red: 0.549, green: 0.251, blue: 0.875)
/* Android */
Color.parseColor("#8c40df")Accessibility — WCAG contrast
Aa
#8c40df on white: 5.37:1
AA ✓ pass · AA-large ✓ · AAA ✗
Aa
#8c40df on black: 3.91:1
AA ✗ fail · AA-large ✓ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red54.9%
Green25.1%
Blue87.5%
CMYK percentages
Cyan37.2%
Magenta71.3%
Yellow0.0%
Key (black)12.5%
Color previews
#8c40df text on a black background
contrast 3.91:1
Card sample
#8c40df text on a white background
contrast 5.37:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #8c40df;
Background color
Panel with #8c40df background
background-color: #8c40df;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #8c40df;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(140, 64, 223, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(140, 64, 223, 0.45);
Border & gradient
Gradient panel
border: 3px solid #8c40df; background: linear-gradient(135deg, #8c40df, #DF40C8);