Skip to content

#2d0c5f

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

RGB
45, 12, 95
HSL
264°, 78%, 21%
CMYK
53, 87, 0, 63
Luminance
0.0165

Every format

HEX#2d0c5f
RGBrgb(45, 12, 95)
HSLhsl(264, 78%, 21%)
CMYKcmyk(53%, 87%, 0%, 63%)
LABlab(13.5 35.5 -42.2)
LCHlch(13.5 55.2 310.1)
OKLCHoklch(0.271 0.132 293.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2d0c5f on white: 15.80:1
AA ✓ pass · AA-large · AAA
Aa
#2d0c5f on black: 1.33:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red17.6%
Green4.7%
Blue37.3%

CMYK percentages

Cyan52.6%
Magenta87.4%
Yellow0.0%
Key (black)62.7%

Color previews

#2d0c5f text on a black background

contrast 1.33:1

Card sample

#2d0c5f text on a white background

contrast 15.80:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2d0c5f

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2d0c5f in the Color Lab