Skip to content

#28014f

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

RGB
40, 1, 79
HSL
270°, 98%, 16%
CMYK
49, 99, 0, 69
Luminance
0.0104

Every format

HEX#28014f
RGBrgb(40, 1, 79)
HSLhsl(270, 98%, 16%)
CMYKcmyk(49%, 99%, 0%, 69%)
LABlab(9.3 35.5 -38.3)
LCHlch(9.3 52.2 312.9)
OKLCHoklch(0.235 0.125 298.3)

Copy-ready code

/* CSS */
color: #28014f;
background-color: #28014f;
/* Tailwind (arbitrary) */
class="text-[#28014f] bg-[#28014f]"
/* SCSS */
$brand: #28014f;
/* SwiftUI */
Color(red: 0.157, green: 0.004, blue: 0.310)
/* Android */
Color.parseColor("#28014f")

Accessibility — WCAG contrast

Aa
#28014f on white: 17.39:1
AA ✓ pass · AA-large · AAA
Aa
#28014f on black: 1.21:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red15.7%
Green0.4%
Blue31.0%

CMYK percentages

Cyan49.4%
Magenta98.7%
Yellow0.0%
Key (black)69.0%

Color previews

#28014f text on a black background

contrast 1.21:1

Card sample

#28014f text on a white background

contrast 17.39:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #28014f;
Background color
Panel with #28014f background
background-color: #28014f;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(40, 1, 79, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(40, 1, 79, 0.45);
Border & gradient
Gradient panel
border: 3px solid #28014f;
background: linear-gradient(135deg, #28014f, #4F0142);

Monochromatic scale

Palettes built from #28014f

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #28014f in the Color Lab