Skip to content

#2f4eaf

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

RGB
47, 78, 175
HSL
226°, 58%, 44%
CMYK
73, 55, 0, 31
Luminance
0.0915

Every format

HEX#2f4eaf
RGBrgb(47, 78, 175)
HSLhsl(226, 58%, 44%)
CMYKcmyk(73%, 55%, 0%, 31%)
LABlab(36.3 23.0 -55.1)
LCHlch(36.3 59.7 292.6)
OKLCHoklch(0.459 0.159 266.6)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f4eaf on white: 7.42:1
AA ✓ pass · AA-large · AAA
Aa
#2f4eaf on black: 2.83:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green30.6%
Blue68.6%

CMYK percentages

Cyan73.1%
Magenta55.4%
Yellow0.0%
Key (black)31.4%

Color previews

#2f4eaf text on a black background

contrast 2.83:1

Card sample

#2f4eaf text on a white background

contrast 7.42:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 78, 175, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 78, 175, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f4eaf;
background: linear-gradient(135deg, #2f4eaf, #652FAF);

Monochromatic scale

Palettes built from #2f4eaf

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f4eaf in the Color Lab