Skip to content

#2f4dab

a dark, vivid blue · warm · closest name: royalblue

RGB
47, 77, 171
HSL
226°, 57%, 43%
CMYK
73, 55, 0, 33
Luminance
0.0885

Every format

HEX#2f4dab
RGBrgb(47, 77, 171)
HSLhsl(226, 57%, 43%)
CMYKcmyk(73%, 55%, 0%, 33%)
LABlab(35.7 22.1 -53.7)
LCHlch(35.7 58.1 292.4)
OKLCHoklch(0.454 0.155 266.7)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f4dab on white: 7.58:1
AA ✓ pass · AA-large · AAA
Aa
#2f4dab on black: 2.77:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green30.2%
Blue67.1%

CMYK percentages

Cyan72.5%
Magenta55.0%
Yellow0.0%
Key (black)32.9%

Color previews

#2f4dab text on a black background

contrast 2.77:1

Card sample

#2f4dab text on a white background

contrast 7.58:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 77, 171, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 77, 171, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f4dab;
background: linear-gradient(135deg, #2f4dab, #642FAB);

Monochromatic scale

Palettes built from #2f4dab

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f4dab in the Color Lab