#2872df
a balanced, vivid blue · cool · closest name: royalblue
RGB
40, 114, 223
HSL
216°, 74%, 52%
CMYK
82, 49, 0, 13
Luminance
0.1781
Every format
| HEX | #2872df |
| RGB | rgb(40, 114, 223) |
| HSL | hsl(216, 74%, 52%) |
| CMYK | cmyk(82%, 49%, 0%, 13%) |
| LAB | lab(49.3 17.1 -61.9) |
| LCH | lch(49.3 64.2 285.5) |
| OKLCH | oklch(0.568 0.182 258.7) |
Copy-ready code
/* CSS */
color: #2872df;
background-color: #2872df;
/* Tailwind (arbitrary) */
class="text-[#2872df] bg-[#2872df]"
/* SCSS */
$brand: #2872df;
/* SwiftUI */
Color(red: 0.157, green: 0.447, blue: 0.875)
/* Android */
Color.parseColor("#2872df")Accessibility — WCAG contrast
Aa
#2872df on white: 4.60:1
AA ✓ pass · AA-large ✓ · AAA ✗
Aa
#2872df on black: 4.56:1
AA ✓ pass · AA-large ✓ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red15.7%
Green44.7%
Blue87.5%
CMYK percentages
Cyan82.1%
Magenta48.9%
Yellow0.0%
Key (black)12.5%
Color previews
#2872df text on a black background
contrast 4.56:1
Card sample
#2872df text on a white background
contrast 4.60:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #2872df;
Background color
Panel with #2872df background
background-color: #2872df;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #2872df;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(40, 114, 223, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(40, 114, 223, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2872df; background: linear-gradient(135deg, #2872df, #5828DF);