Skip to content

#2f0c5f

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

RGB
47, 12, 95
HSL
265°, 78%, 21%
CMYK
51, 87, 0, 63
Luminance
0.0169

Every format

HEX#2f0c5f
RGBrgb(47, 12, 95)
HSLhsl(265, 78%, 21%)
CMYKcmyk(51%, 87%, 0%, 63%)
LABlab(13.8 35.8 -41.7)
LCHlch(13.8 55.0 310.7)
OKLCHoklch(0.273 0.132 294.9)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f0c5f on white: 15.69:1
AA ✓ pass · AA-large · AAA
Aa
#2f0c5f on black: 1.34:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green4.7%
Blue37.3%

CMYK percentages

Cyan50.5%
Magenta87.4%
Yellow0.0%
Key (black)62.7%

Color previews

#2f0c5f text on a black background

contrast 1.34:1

Card sample

#2f0c5f text on a white background

contrast 15.69:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f0c5f

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f0c5f in the Color Lab