#0040c2
a dark, electric blue · cool · closest name: slateblue
RGB
0, 64, 194
HSL
220°, 100%, 38%
CMYK
100, 67, 0, 24
Luminance
0.0756
Every format
| HEX | #0040c2 |
| RGB | rgb(0, 64, 194) |
| HSL | hsl(220, 100%, 38%) |
| CMYK | cmyk(100%, 67%, 0%, 24%) |
| LAB | lab(33.0 36.4 -71.6) |
| LCH | lch(33.0 80.3 296.9) |
| OKLCH | oklch(0.437 0.210 262.5) |
Copy-ready code
/* CSS */
color: #0040c2;
background-color: #0040c2;
/* Tailwind (arbitrary) */
class="text-[#0040c2] bg-[#0040c2]"
/* SCSS */
$brand: #0040c2;
/* SwiftUI */
Color(red: 0.000, green: 0.251, blue: 0.761)
/* Android */
Color.parseColor("#0040c2")Accessibility — WCAG contrast
Aa
#0040c2 on white: 8.36:1
AA ✓ pass · AA-large ✓ · AAA ✓
Aa
#0040c2 on black: 2.51:1
AA ✗ fail · AA-large ✗ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red0.0%
Green25.1%
Blue76.1%
CMYK percentages
Cyan100.0%
Magenta67.0%
Yellow0.0%
Key (black)23.9%
Color previews
#0040c2 text on a black background
contrast 2.51:1
Card sample
#0040c2 text on a white background
contrast 8.36:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #0040c2;
Background color
Panel with #0040c2 background
background-color: #0040c2;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #0040c2;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(0, 64, 194, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(0, 64, 194, 0.45);
Border & gradient
Gradient panel
border: 3px solid #0040c2; background: linear-gradient(135deg, #0040c2, #4100C2);