Skip to content

#2d024d

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

RGB
45, 2, 77
HSL
274°, 95%, 16%
CMYK
42, 97, 0, 70
Luminance
0.0114

Every format

HEX#2d024d
RGBrgb(45, 2, 77)
HSLhsl(274, 95%, 16%)
CMYKcmyk(42%, 97%, 0%, 70%)
LABlab(10.1 35.1 -35.6)
LCHlch(10.1 50.0 314.6)
OKLCHoklch(0.241 0.122 303.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2d024d on white: 17.11:1
AA ✓ pass · AA-large · AAA
Aa
#2d024d on black: 1.23:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red17.6%
Green0.8%
Blue30.2%

CMYK percentages

Cyan41.6%
Magenta97.4%
Yellow0.0%
Key (black)69.8%

Color previews

#2d024d text on a black background

contrast 1.23:1

Card sample

#2d024d text on a white background

contrast 17.11:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2d024d

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2d024d in the Color Lab