Skip to content

#1f0f2e

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

RGB
31, 15, 46
HSL
271°, 51%, 12%
CMYK
33, 67, 0, 82
Luminance
0.0083

Every format

HEX#1f0f2e
RGBrgb(31, 15, 46)
HSLhsl(271, 51%, 12%)
CMYKcmyk(33%, 67%, 0%, 82%)
LABlab(7.5 16.1 -17.7)
LCHlch(7.5 23.9 312.3)
OKLCHoklch(0.209 0.061 305.6)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#1f0f2e on white: 18.01:1
AA ✓ pass · AA-large · AAA
Aa
#1f0f2e on black: 1.17:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red12.2%
Green5.9%
Blue18.0%

CMYK percentages

Cyan32.6%
Magenta67.4%
Yellow0.0%
Key (black)82.0%

Color previews

#1f0f2e text on a black background

contrast 1.17:1

Card sample

#1f0f2e text on a white background

contrast 18.01:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #1f0f2e;
Background color
Panel with #1f0f2e background
background-color: #1f0f2e;
Text shadow — hex

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(31, 15, 46, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(31, 15, 46, 0.45);
Border & gradient
Gradient panel
border: 3px solid #1f0f2e;
background: linear-gradient(135deg, #1f0f2e, #2E0F28);

Monochromatic scale

Palettes built from #1f0f2e

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #1f0f2e in the Color Lab