Skip to content

#2a1069

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

RGB
42, 16, 105
HSL
258°, 74%, 24%
CMYK
60, 85, 0, 59
Luminance
0.0188

Every format

HEX#2a1069
RGBrgb(42, 16, 105)
HSLhsl(258, 74%, 24%)
CMYKcmyk(60%, 85%, 0%, 59%)
LABlab(14.9 36.3 -46.6)
LCHlch(14.9 59.1 307.9)
OKLCHoklch(0.282 0.140 286.7)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2a1069 on white: 15.26:1
AA ✓ pass · AA-large · AAA
Aa
#2a1069 on black: 1.38:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red16.5%
Green6.3%
Blue41.2%

CMYK percentages

Cyan60.0%
Magenta84.8%
Yellow0.0%
Key (black)58.8%

Color previews

#2a1069 text on a black background

contrast 1.38:1

Card sample

#2a1069 text on a white background

contrast 15.26:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2a1069

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2a1069 in the Color Lab