Skip to content

#0f309c

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

RGB
15, 48, 156
HSL
226°, 83%, 34%
CMYK
90, 69, 0, 39
Luminance
0.0462

Every format

HEX#0f309c
RGBrgb(15, 48, 156)
HSLhsl(226, 83%, 34%)
CMYKcmyk(90%, 69%, 0%, 39%)
LABlab(25.6 32.7 -61.2)
LCHlch(25.6 69.4 298.1)
OKLCHoklch(0.371 0.178 264.9)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#0f309c on white: 10.92:1
AA ✓ pass · AA-large · AAA
Aa
#0f309c on black: 1.92:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red5.9%
Green18.8%
Blue61.2%

CMYK percentages

Cyan90.4%
Magenta69.2%
Yellow0.0%
Key (black)38.8%

Color previews

#0f309c text on a black background

contrast 1.92:1

Card sample

#0f309c text on a white background

contrast 10.92:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(15, 48, 156, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(15, 48, 156, 0.45);
Border & gradient
Gradient panel
border: 3px solid #0f309c;
background: linear-gradient(135deg, #0f309c, #4C0F9C);

Monochromatic scale

Palettes built from #0f309c

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #0f309c in the Color Lab