#5F317E#5F317E

#5F317E is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.0% C 0.130 H 309.4°. Best body text is #FFFFFF at 9.43:1 contrast (WCAG AA passes).

Color values

HEX#5F317E
RGBrgb(95, 49, 126)
HSLhsl(276, 44%, 34%)
HSVhsv(276, 61%, 49%)
CMYKcmyk(24.6%, 61.1%, 0%, 50.6%)
CIE-LABlab(29.75, 35.50, -35.58)
CIE-LCHlch(29.75, 50.27, 314.93°)
OKLaboklab(40.96% 0.0822 -0.1001)
OKLCHoklch(40.96% 0.13 309.4)
XYZxyz(9.5828, 6.1360, 20.4142)
Luminance0.0614 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F317E #507E31
analogous
#39317E #5F317E #7E3177
triadic
#5F317E #7E5F31 #317E5F
tetradic
#5F317E #7E3931 #507E31 #31777E
square
#5F317E #7E3931 #507E31 #31777E
split-complementary
#5F317E #777E31 #317E39
monochromatic
#1D0F26 #3E2052 #5F317E #8042AA #9E66C3

Accessibility & contrast

On white

9.43
#5F317E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.23
#5F317E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F317E
9.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F317E#FFFFFF#000000##FFFFFF
##5F317E1.009.432.239.43
#FFFFFF9.431.0021.001.00
#0000002.2321.001.0021.00
##FFFFFF9.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#144480
Deuteranopia (green-blind)
#28477C
Tritanopia (blue-blind)
#5B3F52
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5f317e;
/* rgb */ color: rgb(95, 49, 126);
/* oklch */ color: oklch(41.0% 0.130 309.4);
Tailwind
colors: {
  custom: {
    50: '#8f6ba4',
    500: '#5f317e',
    950: '#000000',
  },
}
SCSS
$custom: #5f317e;
$custom-light: #8f6ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#5f317e",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 126
  },
  "hsl": {
    "h": 275.844,
    "s": 44,
    "l": 34.314
  },
  "oklch": {
    "l": 0.40957,
    "c": 0.12958,
    "h": 309.4
  },
  "luminance": 0.06136
}

Semantic roles & 50–950 ramp

primary
#5F317E
secondary
#7EAB60
accent
#D45487
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D070F
muted
#7E7A7F

Preview Lab

Preview with #5F317E

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

Preview Lab → · Contrast checker → · Palette generator →

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