#5F2172#5F2172

#5F2172 is a dark, vivid purple. Relative luminance 0.047; OKLCH L 38.0% C 0.141 H 317.2°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#5F2172
RGBrgb(95, 33, 114)
HSLhsl(286, 55%, 29%)
HSVhsv(286, 71%, 45%)
CMYKcmyk(16.7%, 71.1%, 0%, 55.3%)
CIE-LABlab(25.97, 40.93, -34.04)
CIE-LCHlch(25.97, 53.23, 320.25°)
OKLaboklab(37.97% 0.1033 -0.0955)
OKLCHoklch(37.97% 0.141 317.2)
XYZxyz(8.3000, 4.7359, 16.3932)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F2172 #347221
analogous
#372172 #5F2172 #72215D
triadic
#5F2172 #725F21 #21725F
tetradic
#5F2172 #723721 #347221 #215D72
square
#5F2172 #723721 #347221 #215D72
split-complementary
#5F2172 #5D7221 #217237
monochromatic
#140718 #371343 #5F2172 #872FA1 #AA44C9

Accessibility & contrast

On white

10.78
#5F2172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#5F2172 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F2172
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F2172#FFFFFF#000000##FFFFFF
##5F21721.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A74
Deuteranopia (green-blind)
#233F70
Tritanopia (blue-blind)
#5E3047
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5f2172;
/* rgb */ color: rgb(95, 33, 114);
/* oklch */ color: oklch(38.0% 0.141 317.2);
Tailwind
colors: {
  custom: {
    50: '#8f629b',
    500: '#5f2172',
    950: '#000000',
  },
}
SCSS
$custom: #5f2172;
$custom-light: #8f629b;
$custom-dark: #000000;
JSON
{
  "hex": "#5f2172",
  "rgb": {
    "r": 95,
    "g": 33,
    "b": 114
  },
  "hsl": {
    "h": 285.926,
    "s": 55.102,
    "l": 28.824
  },
  "oklch": {
    "l": 0.37966,
    "c": 0.14067,
    "h": 317.2
  },
  "luminance": 0.04736
}

Semantic roles & 50–950 ramp

primary
#5F2172
secondary
#5FA549
accent
#DE496C
background
#F9F6F9
surface
#F1EBF2
border
#CBC6CC
text
#0D050E
muted
#7E7A7E

Preview Lab

Preview with #5F2172

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

Preview Lab → · Contrast checker → · Palette generator →

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