#5F178C#5F178C

#5F178C is a dark, vivid violet. Relative luminance 0.049; OKLCH L 39.0% C 0.178 H 307.6°. Best body text is #FFFFFF at 10.56:1 contrast (WCAG AA passes).

Color values

HEX#5F178C
RGBrgb(95, 23, 140)
HSLhsl(277, 72%, 32%)
HSVhsv(277, 84%, 55%)
CMYKcmyk(32.1%, 83.6%, 0%, 45.1%)
CIE-LABlab(26.56, 50.67, -49.49)
CIE-LCHlch(26.56, 70.83, 315.68°)
OKLaboklab(39.01% 0.1083 -0.1408)
OKLCHoklch(39.01% 0.178 307.6)
XYZxyz(9.7583, 4.9393, 25.2452)
Luminance0.0494 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F178C #448C17
analogous
#25178C #5F178C #8C177F
triadic
#5F178C #8C5F17 #178C5F
tetradic
#5F178C #8C2517 #448C17 #177F8C
square
#5F178C #8C2517 #448C17 #177F8C
split-complementary
#5F178C #7F8C17 #178C25
monochromatic
#180623 #3B0E57 #5F178C #8320C1 #A13EDF

Accessibility & contrast

On white

10.56
#5F178C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.99
#5F178C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F178C
10.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F178C#FFFFFF#000000##FFFFFF
##5F178C1.0010.561.9910.56
#FFFFFF10.561.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8F
Deuteranopia (green-blind)
#003F8A
Tritanopia (blue-blind)
#573753
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5f178c;
/* rgb */ color: rgb(95, 23, 140);
/* oklch */ color: oklch(39.0% 0.178 307.6);
Tailwind
colors: {
  custom: {
    50: '#925fae',
    500: '#5f178c',
    950: '#000000',
  },
}
SCSS
$custom: #5f178c;
$custom-light: #925fae;
$custom-dark: #000000;
JSON
{
  "hex": "#5f178c",
  "rgb": {
    "r": 95,
    "g": 23,
    "b": 140
  },
  "hsl": {
    "h": 276.923,
    "s": 71.779,
    "l": 31.961
  },
  "oklch": {
    "l": 0.39008,
    "c": 0.17763,
    "h": 307.6
  },
  "luminance": 0.04939
}

Semantic roles & 50–950 ramp

primary
#5F178C
secondary
#71BF3F
accent
#EF397F
background
#F9F5FA
surface
#F2EAF4
border
#CCC6CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5F178C

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

Preview Lab → · Contrast checker → · Palette generator →

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