Skip to content

#0f1f4d

a deep, vivid blue · cool · closest name: midnightblue

RGB
15, 31, 77
HSL
225°, 67%, 18%
CMYK
81, 60, 0, 70
Luminance
0.0162

Every format

HEX#0f1f4d
RGBrgb(15, 31, 77)
HSLhsl(225, 67%, 18%)
CMYKcmyk(81%, 60%, 0%, 70%)
LABlab(13.3 12.2 -30.4)
LCHlch(13.3 32.8 291.9)
OKLCHoklch(0.257 0.088 265.9)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#0f1f4d on white: 15.87:1
AA ✓ pass · AA-large · AAA
Aa
#0f1f4d on black: 1.32:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red5.9%
Green12.2%
Blue30.2%

CMYK percentages

Cyan80.5%
Magenta59.7%
Yellow0.0%
Key (black)69.8%

Color previews

#0f1f4d text on a black background

contrast 1.32:1

Card sample

#0f1f4d text on a white background

contrast 15.87:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(15, 31, 77, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(15, 31, 77, 0.45);
Border & gradient
Gradient panel
border: 3px solid #0f1f4d;
background: linear-gradient(135deg, #0f1f4d, #280F4D);

Monochromatic scale

Palettes built from #0f1f4d

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #0f1f4d in the Color Lab