#5F178E#5F178E

#5F178E is a dark, vivid violet. Relative luminance 0.050; OKLCH L 39.2% C 0.180 H 306.9°. Best body text is #FFFFFF at 10.50:1 contrast (WCAG AA passes).

Color values

HEX#5F178E
RGBrgb(95, 23, 142)
HSLhsl(276, 72%, 32%)
HSVhsv(276, 84%, 56%)
CMYKcmyk(33.1%, 83.8%, 0%, 44.3%)
CIE-LABlab(26.73, 51.12, -50.45)
CIE-LCHlch(26.73, 71.83, 315.38°)
OKLaboklab(39.18% 0.1077 -0.1436)
OKLCHoklch(39.18% 0.18 306.9)
XYZxyz(9.9071, 4.9988, 26.0289)
Luminance0.0500 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F178E #468E17
analogous
#24178E #5F178E #8E1781
triadic
#5F178E #8E5F17 #178E5F
tetradic
#5F178E #8E2417 #468E17 #17818E
square
#5F178E #8E2417 #468E17 #17818E
split-complementary
#5F178E #818E17 #178E24
monochromatic
#190625 #3C0E59 #5F178E #8220C3 #A13FE0

Accessibility & contrast

On white

10.50
#5F178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#5F178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F178E
10.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F178E#FFFFFF#000000##FFFFFF
##5F178E1.0010.502.0010.50
#FFFFFF10.501.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D91
Deuteranopia (green-blind)
#00408C
Tritanopia (blue-blind)
#573854
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5f178e;
/* rgb */ color: rgb(95, 23, 142);
/* oklch */ color: oklch(39.2% 0.180 306.9);
Tailwind
colors: {
  custom: {
    50: '#925fb0',
    500: '#5f178e',
    950: '#000000',
  },
}
SCSS
$custom: #5f178e;
$custom-light: #925fb0;
$custom-dark: #000000;
JSON
{
  "hex": "#5f178e",
  "rgb": {
    "r": 95,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 276.303,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.39179,
    "c": 0.17955,
    "h": 306.9
  },
  "luminance": 0.04999
}

Semantic roles & 50–950 ramp

primary
#5F178E
secondary
#73C040
accent
#EF3981
background
#F9F5FA
surface
#F2EAF5
border
#CCC6CF
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5F178E

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

Preview Lab → · Contrast checker → · Palette generator →

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