Skip to content

#1f2f5d

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

RGB
31, 47, 93
HSL
225°, 50%, 24%
CMYK
67, 50, 0, 64
Luminance
0.0311

Every format

HEX#1f2f5d
RGBrgb(31, 47, 93)
HSLhsl(225, 50%, 24%)
CMYKcmyk(67%, 50%, 0%, 64%)
LABlab(20.5 9.9 -29.6)
LCHlch(20.5 31.2 288.6)
OKLCHoklch(0.318 0.085 267.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#1f2f5d on white: 12.94:1
AA ✓ pass · AA-large · AAA
Aa
#1f2f5d on black: 1.62:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red12.2%
Green18.4%
Blue36.5%

CMYK percentages

Cyan66.7%
Magenta49.5%
Yellow0.0%
Key (black)63.5%

Color previews

#1f2f5d text on a black background

contrast 1.62:1

Card sample

#1f2f5d text on a white background

contrast 12.94:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #1f2f5d;
Background color
Panel with #1f2f5d background
background-color: #1f2f5d;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(31, 47, 93, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 47, 93, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f2f5d;
background: linear-gradient(135deg, #1f2f5d, #381F5D);

Monochromatic scale

Palettes built from #1f2f5d

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #1f2f5d in the Color Lab