Skip to content

#2f1fab

a dark, vivid blue · warm · closest name: navy

RGB
47, 31, 171
HSL
247°, 69%, 40%
CMYK
73, 82, 0, 33
Luminance
0.0452

Every format

HEX#2f1fab
RGBrgb(47, 31, 171)
HSLhsl(247, 69%, 40%)
CMYKcmyk(73%, 82%, 0%, 33%)
LABlab(25.3 49.8 -70.7)
LCHlch(25.3 86.5 305.2)
OKLCHoklch(0.379 0.205 275.4)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#2f1fab on white: 11.02:1
AA ✓ pass · AA-large · AAA
Aa
#2f1fab on black: 1.90:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red18.4%
Green12.2%
Blue67.1%

CMYK percentages

Cyan72.5%
Magenta81.9%
Yellow0.0%
Key (black)32.9%

Color previews

#2f1fab text on a black background

contrast 1.90:1

Card sample

#2f1fab text on a white background

contrast 11.02:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #2f1fab

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #2f1fab in the Color Lab