Skip to content

#0f2f78

a dark, electric blue · cool · closest name: midnightblue

RGB
15, 47, 120
HSL
222°, 78%, 27%
CMYK
88, 61, 0, 53
Luminance
0.0349

Every format

HEX#0f2f78
RGBrgb(15, 47, 120)
HSLhsl(222, 78%, 27%)
CMYKcmyk(88%, 61%, 0%, 53%)
LABlab(21.9 18.9 -44.8)
LCHlch(21.9 48.6 292.8)
OKLCHoklch(0.334 0.131 263.2)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#0f2f78 on white: 12.37:1
AA ✓ pass · AA-large · AAA
Aa
#0f2f78 on black: 1.70:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red5.9%
Green18.4%
Blue47.1%

CMYK percentages

Cyan87.5%
Magenta60.8%
Yellow0.0%
Key (black)52.9%

Color previews

#0f2f78 text on a black background

contrast 1.70:1

Card sample

#0f2f78 text on a white background

contrast 12.37:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #0f2f78;
Background color
Panel with #0f2f78 background
background-color: #0f2f78;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(15, 47, 120, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(15, 47, 120, 0.45);
Border & gradient
Gradient panel
border: 3px solid #0f2f78;
background: linear-gradient(135deg, #0f2f78, #350F78);

Monochromatic scale

Palettes built from #0f2f78

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #0f2f78 in the Color Lab