Skip to content

#2f034e

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

RGB
47, 3, 78
HSL
275°, 93%, 16%
CMYK
40, 96, 0, 69
Luminance
0.0122

Every format

HEX#2f034e
RGBrgb(47, 3, 78)
HSLhsl(275, 93%, 16%)
CMYKcmyk(40%, 96%, 0%, 69%)
LABlab(10.7 35.2 -35.2)
LCHlch(10.7 49.8 315.0)
OKLCHoklch(0.247 0.122 304.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f034e on white: 16.88:1
AA ✓ pass · AA-large · AAA
Aa
#2f034e on black: 1.24:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green1.2%
Blue30.6%

CMYK percentages

Cyan39.7%
Magenta96.2%
Yellow0.0%
Key (black)69.4%

Color previews

#2f034e text on a black background

contrast 1.24:1

Card sample

#2f034e text on a white background

contrast 16.88:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f034e

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f034e in the Color Lab