#040cf0
a balanced, electric blue · warm · closest name: blue
RGB
4, 12, 240
HSL
238°, 97%, 48%
CMYK
98, 95, 0, 6
Luminance
0.0658
Every format
| HEX | #040cf0 |
| RGB | rgb(4, 12, 240) |
| HSL | hsl(238, 97%, 48%) |
| CMYK | cmyk(98%, 95%, 0%, 6%) |
| LAB | lab(30.8 73.7 -101.9) |
| LCH | lch(30.8 125.7 305.9) |
| OKLCH | oklch(0.437 0.296 264.4) |
Copy-ready code
/* CSS */
color: #040cf0;
background-color: #040cf0;
/* Tailwind (arbitrary) */
class="text-[#040cf0] bg-[#040cf0]"
/* SCSS */
$brand: #040cf0;
/* SwiftUI */
Color(red: 0.016, green: 0.047, blue: 0.941)
/* Android */
Color.parseColor("#040cf0")Accessibility — WCAG contrast
Aa
#040cf0 on white: 9.07:1
AA ✓ pass · AA-large ✓ · AAA ✓
Aa
#040cf0 on black: 2.32:1
AA ✗ fail · AA-large ✗ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red1.6%
Green4.7%
Blue94.1%
CMYK percentages
Cyan98.3%
Magenta95.0%
Yellow0.0%
Key (black)5.9%
Color previews
#040cf0 text on a black background
contrast 2.32:1
Card sample
#040cf0 text on a white background
contrast 9.07:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #040cf0;
Background color
Panel with #040cf0 background
background-color: #040cf0;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #040cf0;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(4, 12, 240, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(4, 12, 240, 0.45);
Border & gradient
Gradient panel
border: 3px solid #040cf0; background: linear-gradient(135deg, #040cf0, #9904F0);