Skip to content

#2f0c47

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

RGB
47, 12, 71
HSL
276°, 71%, 16%
CMYK
34, 83, 0, 72
Luminance
0.0132

Every format

HEX#2f0c47
RGBrgb(47, 12, 71)
HSLhsl(276, 71%, 16%)
CMYKcmyk(34%, 83%, 0%, 72%)
LABlab(11.4 29.3 -29.2)
LCHlch(11.4 41.3 315.1)
OKLCHoklch(0.250 0.104 307.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f0c47 on white: 16.61:1
AA ✓ pass · AA-large · AAA
Aa
#2f0c47 on black: 1.26:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green4.7%
Blue27.8%

CMYK percentages

Cyan33.8%
Magenta83.1%
Yellow0.0%
Key (black)72.2%

Color previews

#2f0c47 text on a black background

contrast 1.26:1

Card sample

#2f0c47 text on a white background

contrast 16.61:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f0c47

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f0c47 in the Color Lab