Skip to content

#2f034f

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

RGB
47, 3, 79
HSL
275°, 93%, 16%
CMYK
41, 96, 0, 69
Luminance
0.0123

Every format

HEX#2f034f
RGBrgb(47, 3, 79)
HSLhsl(275, 93%, 16%)
CMYKcmyk(41%, 96%, 0%, 69%)
LABlab(10.8 35.4 -35.8)
LCHlch(10.8 50.3 314.7)
OKLCHoklch(0.248 0.123 304.2)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f034f on white: 16.84:1
AA ✓ pass · AA-large · AAA
Aa
#2f034f on black: 1.25:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green1.2%
Blue31.0%

CMYK percentages

Cyan40.5%
Magenta96.2%
Yellow0.0%
Key (black)69.0%

Color previews

#2f034f text on a black background

contrast 1.25:1

Card sample

#2f034f text on a white background

contrast 16.84:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f034f

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f034f in the Color Lab