Skip to content

#2f2f5b

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

RGB
47, 47, 91
HSL
240°, 32%, 27%
CMYK
48, 48, 0, 64
Luminance
0.0339

Every format

HEX#2f2f5b
RGBrgb(47, 47, 91)
HSLhsl(240, 32%, 27%)
CMYKcmyk(48%, 48%, 0%, 64%)
LABlab(21.6 13.2 -26.5)
LCHlch(21.6 29.6 296.4)
OKLCHoklch(0.329 0.076 281.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f2f5b on white: 12.51:1
AA ✓ pass · AA-large · AAA
Aa
#2f2f5b on black: 1.68:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green18.4%
Blue35.7%

CMYK percentages

Cyan48.4%
Magenta48.4%
Yellow0.0%
Key (black)64.3%

Color previews

#2f2f5b text on a black background

contrast 1.68:1

Card sample

#2f2f5b text on a white background

contrast 12.51:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #2f2f5b;
Background color
Panel with #2f2f5b background
background-color: #2f2f5b;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 47, 91, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 47, 91, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f2f5b;
background: linear-gradient(135deg, #2f2f5b, #4C2F5B);

Monochromatic scale

Palettes built from #2f2f5b

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f2f5b in the Color Lab