#5F317D#5F317D

#5F317D is a dark, vivid violet. Relative luminance 0.061; OKLCH L 40.9% C 0.128 H 309.8°. Best body text is #FFFFFF at 9.45:1 contrast (WCAG AA passes).

Color values

HEX#5F317D
RGBrgb(95, 49, 125)
HSLhsl(276, 44%, 34%)
HSVhsv(276, 61%, 49%)
CMYKcmyk(24%, 60.8%, 0%, 51%)
CIE-LABlab(29.69, 35.26, -35.06)
CIE-LCHlch(29.69, 49.72, 315.16°)
OKLaboklab(40.89% 0.0822 -0.0986)
OKLCHoklch(40.89% 0.128 309.8)
XYZxyz(9.5186, 6.1104, 20.0760)
Luminance0.0611 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F317D #4F7D31
analogous
#39317D #5F317D #7D3175
triadic
#5F317D #7D5F31 #317D5F
tetradic
#5F317D #7D3931 #4F7D31 #31757D
square
#5F317D #7D3931 #4F7D31 #31757D
split-complementary
#5F317D #757D31 #317D39
monochromatic
#1C0F25 #3E2051 #5F317D #8042A9 #9E66C3

Accessibility & contrast

On white

9.45
#5F317D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.22
#5F317D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F317D
9.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F317D#FFFFFF#000000##FFFFFF
##5F317D1.009.452.229.45
#FFFFFF9.451.0021.001.00
#0000002.2221.001.0021.00
##FFFFFF9.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#15447F
Deuteranopia (green-blind)
#29477B
Tritanopia (blue-blind)
#5B3F52
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5f317d;
/* rgb */ color: rgb(95, 49, 125);
/* oklch */ color: oklch(40.9% 0.128 309.8);
Tailwind
colors: {
  custom: {
    50: '#8f6ba3',
    500: '#5f317d',
    950: '#000000',
  },
}
SCSS
$custom: #5f317d;
$custom-light: #8f6ba3;
$custom-dark: #000000;
JSON
{
  "hex": "#5f317d",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 125
  },
  "hsl": {
    "h": 276.316,
    "s": 43.678,
    "l": 34.118
  },
  "oklch": {
    "l": 0.4089,
    "c": 0.12838,
    "h": 309.8
  },
  "luminance": 0.0611
}

Semantic roles & 50–950 ramp

primary
#5F317D
secondary
#7DAA60
accent
#D35487
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0D070F
muted
#7D7A7F

Preview Lab

Preview with #5F317D

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

Preview Lab → · Contrast checker → · Palette generator →

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