Skip to content

#2a7dfb

a balanced, electric blue · cool · closest name: royalblue

RGB
42, 125, 251
HSL
216°, 96%, 58%
CMYK
83, 50, 0, 2
Luminance
0.2212

Every format

HEX#2a7dfb
RGBrgb(42, 125, 251)
HSLhsl(216, 96%, 58%)
CMYKcmyk(83%, 50%, 0%, 2%)
LABlab(54.2 20.9 -69.6)
LCHlch(54.2 72.7 286.7)
OKLCHoklch(0.612 0.204 259.2)

Copy-ready code

/* CSS */
color: #2a7dfb;
background-color: #2a7dfb;
/* Tailwind (arbitrary) */
class="text-[#2a7dfb] bg-[#2a7dfb]"
/* SCSS */
$brand: #2a7dfb;
/* SwiftUI */
Color(red: 0.165, green: 0.490, blue: 0.984)
/* Android */
Color.parseColor("#2a7dfb")

Accessibility — WCAG contrast

Aa
#2a7dfb on white: 3.87:1
AA ✗ fail · AA-large · AAA
Aa
#2a7dfb on black: 5.42:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red16.5%
Green49.0%
Blue98.4%

CMYK percentages

Cyan83.3%
Magenta50.2%
Yellow0.0%
Key (black)1.6%

Color previews

#2a7dfb text on a black background

contrast 5.42:1

Card sample

#2a7dfb text on a white background

contrast 3.87:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2a7dfb;
Background color
Panel with #2a7dfb background
background-color: #2a7dfb;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #2a7dfb;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(42, 125, 251, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(42, 125, 251, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2a7dfb;
background: linear-gradient(135deg, #2a7dfb, #632AFB);

Monochromatic scale

Palettes built from #2a7dfb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2a7dfb in the Color Lab