Skip to content

#0f2f7f

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

RGB
15, 47, 127
HSL
223°, 79%, 28%
CMYK
88, 63, 0, 50
Luminance
0.0367

Every format

HEX#0f2f7f
RGBrgb(15, 47, 127)
HSLhsl(223, 79%, 28%)
CMYKcmyk(88%, 63%, 0%, 50%)
LABlab(22.5 21.8 -48.2)
LCHlch(22.5 52.9 294.3)
OKLCHoklch(0.340 0.140 263.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#0f2f7f on white: 12.12:1
AA ✓ pass · AA-large · AAA
Aa
#0f2f7f on black: 1.73:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red5.9%
Green18.4%
Blue49.8%

CMYK percentages

Cyan88.2%
Magenta63.0%
Yellow0.0%
Key (black)50.2%

Color previews

#0f2f7f text on a black background

contrast 1.73:1

Card sample

#0f2f7f text on a white background

contrast 12.12:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #0f2f7f

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #0f2f7f in the Color Lab