Skip to content

#2f0d52

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

RGB
47, 13, 82
HSL
270°, 73%, 19%
CMYK
43, 84, 0, 68
Luminance
0.0150

Every format

HEX#2f0d52
RGBrgb(47, 13, 82)
HSLhsl(270, 73%, 19%)
CMYKcmyk(43%, 84%, 0%, 68%)
LABlab(12.6 31.8 -34.9)
LCHlch(12.6 47.2 312.4)
OKLCHoklch(0.261 0.116 300.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f0d52 on white: 16.15:1
AA ✓ pass · AA-large · AAA
Aa
#2f0d52 on black: 1.30:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green5.1%
Blue32.2%

CMYK percentages

Cyan42.7%
Magenta84.1%
Yellow0.0%
Key (black)67.8%

Color previews

#2f0d52 text on a black background

contrast 1.30:1

Card sample

#2f0d52 text on a white background

contrast 16.15:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(47, 13, 82, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(47, 13, 82, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2f0d52;
background: linear-gradient(135deg, #2f0d52, #520D47);

Monochromatic scale

Palettes built from #2f0d52

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f0d52 in the Color Lab