Skip to content

#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
RGBrgb(40, 114, 223)
HSLhsl(216, 74%, 52%)
CMYKcmyk(82%, 49%, 0%, 13%)
LABlab(49.3 17.1 -61.9)
LCHlch(49.3 64.2 285.5)
OKLCHoklch(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);

Monochromatic scale

Palettes built from #2872df

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2872df in the Color Lab