Skip to content

#2f145c

a deep, vivid violet · warm · closest name: midnightblue

RGB
47, 20, 92
HSL
263°, 64%, 22%
CMYK
49, 78, 0, 64
Luminance
0.0188

Every format

HEX#2f145c
RGBrgb(47, 20, 92)
HSLhsl(263, 64%, 22%)
CMYKcmyk(49%, 78%, 0%, 64%)
LABlab(14.8 31.1 -38.0)
LCHlch(14.8 49.1 309.3)
OKLCHoklch(0.280 0.120 294.5)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f145c on white: 15.27:1
AA ✓ pass · AA-large · AAA
Aa
#2f145c on black: 1.38:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green7.8%
Blue36.1%

CMYK percentages

Cyan48.9%
Magenta78.3%
Yellow0.0%
Key (black)63.9%

Color previews

#2f145c text on a black background

contrast 1.38:1

Card sample

#2f145c text on a white background

contrast 15.27:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 20, 92, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 20, 92, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f145c;
background: linear-gradient(135deg, #2f145c, #5C1459);

Monochromatic scale

Palettes built from #2f145c

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f145c in the Color Lab