Skip to content

#2c0f5b

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

RGB
44, 15, 91
HSL
263°, 72%, 21%
CMYK
52, 84, 0, 64
Luminance
0.0163

Every format

HEX#2c0f5b
RGBrgb(44, 15, 91)
HSLhsl(263, 72%, 21%)
CMYKcmyk(52%, 84%, 0%, 64%)
LABlab(13.4 32.9 -39.6)
LCHlch(13.4 51.5 309.7)
OKLCHoklch(0.269 0.124 293.5)

Copy-ready code

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

Accessibility — WCAG contrast

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

RGB percentages

Red17.3%
Green5.9%
Blue35.7%

CMYK percentages

Cyan51.6%
Magenta83.5%
Yellow0.0%
Key (black)64.3%

Color previews

#2c0f5b text on a black background

contrast 1.33:1

Card sample

#2c0f5b text on a white background

contrast 15.83:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(44, 15, 91, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(44, 15, 91, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2c0f5b;
background: linear-gradient(135deg, #2c0f5b, #5B0F57);

Monochromatic scale

Palettes built from #2c0f5b

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2c0f5b in the Color Lab