Skip to content

#1f0f4d

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

RGB
31, 15, 77
HSL
256°, 67%, 18%
CMYK
60, 81, 0, 70
Luminance
0.0117

Every format

HEX#1f0f4d
RGBrgb(31, 15, 77)
HSLhsl(256, 67%, 18%)
CMYKcmyk(60%, 81%, 0%, 70%)
LABlab(10.3 26.3 -35.3)
LCHlch(10.3 44.0 306.7)
OKLCHoklch(0.239 0.106 287.2)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#1f0f4d on white: 17.02:1
AA ✓ pass · AA-large · AAA
Aa
#1f0f4d on black: 1.23:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red12.2%
Green5.9%
Blue30.2%

CMYK percentages

Cyan59.7%
Magenta80.5%
Yellow0.0%
Key (black)69.8%

Color previews

#1f0f4d text on a black background

contrast 1.23:1

Card sample

#1f0f4d text on a white background

contrast 17.02:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #1f0f4d

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #1f0f4d in the Color Lab