#5F1271#5F1271

#5F1271 is a dark, vivid purple. Relative luminance 0.041; OKLCH L 36.4% C 0.157 H 318.9°. Best body text is #FFFFFF at 11.59:1 contrast (WCAG AA passes).

Color values

HEX#5F1271
RGBrgb(95, 18, 113)
HSLhsl(289, 73%, 26%)
HSVhsv(289, 84%, 44%)
CMYKcmyk(15.9%, 84.1%, 0%, 55.7%)
CIE-LABlab(23.86, 46.53, -36.78)
CIE-LCHlch(23.86, 59.31, 321.67°)
OKLaboklab(36.45% 0.1185 -0.1034)
OKLCHoklch(36.45% 0.157 318.9)
XYZxyz(7.9159, 4.0582, 15.9859)
Luminance0.0406 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F1271 #247112
analogous
#301271 #5F1271 #711253
triadic
#5F1271 #715F12 #12715F
tetradic
#5F1271 #713012 #247112 #125371
square
#5F1271 #713012 #247112 #125371
split-complementary
#5F1271 #537112 #127130
monochromatic
#16041A #330A3C #5F1271 #8B1AA6 #B823DB

Accessibility & contrast

On white

11.59
#5F1271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#5F1271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F1271
11.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F1271#FFFFFF#000000##FFFFFF
##5F12711.0011.591.8111.59
#FFFFFF11.591.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003473
Deuteranopia (green-blind)
#193B6F
Tritanopia (blue-blind)
#5F2842
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #5f1271;
/* rgb */ color: rgb(95, 18, 113);
/* oklch */ color: oklch(36.4% 0.157 318.9);
Tailwind
colors: {
  custom: {
    50: '#905b9a',
    500: '#5f1271',
    950: '#000000',
  },
}
SCSS
$custom: #5f1271;
$custom-light: #905b9a;
$custom-dark: #000000;
JSON
{
  "hex": "#5f1271",
  "rgb": {
    "r": 95,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 288.632,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.36447,
    "c": 0.1573,
    "h": 318.9
  },
  "luminance": 0.04058
}

Semantic roles & 50–950 ramp

primary
#5F1271
secondary
#4CA837
accent
#EF395B
background
#F9F5F9
surface
#F1E9F2
border
#CBC5CC
text
#0D040E
muted
#7E797E

Preview Lab

Preview with #5F1271

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#5F1271 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva