Skip to content

#2a003d

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

RGB
42, 0, 61
HSL
281°, 100%, 12%
CMYK
31, 100, 0, 76
Luminance
0.0083

Every format

HEX#2a003d
RGBrgb(42, 0, 61)
HSLhsl(281, 100%, 12%)
CMYKcmyk(31%, 100%, 0%, 76%)
LABlab(7.5 31.9 -28.5)
LCHlch(7.5 42.8 318.2)
OKLCHoklch(0.217 0.109 311.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2a003d on white: 18.01:1
AA ✓ pass · AA-large · AAA
Aa
#2a003d on black: 1.17:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red16.5%
Green0.0%
Blue23.9%

CMYK percentages

Cyan31.1%
Magenta100.0%
Yellow0.0%
Key (black)76.1%

Color previews

#2a003d text on a black background

contrast 1.17:1

Card sample

#2a003d text on a white background

contrast 18.01:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(42, 0, 61, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(42, 0, 61, 0.45);
Border & gradient
Gradient panel
border: 3px solid #2a003d;
background: linear-gradient(135deg, #2a003d, #3D0027);

Monochromatic scale

Palettes built from #2a003d

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2a003d in the Color Lab