#5F178A#5F178A

#5F178A is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.8% C 0.176 H 308.3°. Best body text is #FFFFFF at 10.63:1 contrast (WCAG AA passes).

Color values

HEX#5F178A
RGBrgb(95, 23, 138)
HSLhsl(278, 71%, 32%)
HSVhsv(278, 83%, 54%)
CMYKcmyk(31.2%, 83.3%, 0%, 45.9%)
CIE-LABlab(26.39, 50.23, -48.52)
CIE-LCHlch(26.39, 69.83, 315.99°)
OKLaboklab(38.84% 0.1089 -0.138)
OKLCHoklch(38.84% 0.176 308.3)
XYZxyz(9.6122, 4.8808, 24.4756)
Luminance0.0488 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F178A #428A17
analogous
#25178A #5F178A #8A177C
triadic
#5F178A #8A5F17 #178A5F
tetradic
#5F178A #8A2517 #428A17 #177C8A
square
#5F178A #8A2517 #428A17 #177C8A
split-complementary
#5F178A #7C8A17 #178A25
monochromatic
#170621 #3B0E56 #5F178A #8320BE #A23DDF

Accessibility & contrast

On white

10.63
#5F178A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#5F178A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F178A
10.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F178A#FFFFFF#000000##FFFFFF
##5F178A1.0010.631.9810.63
#FFFFFF10.631.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8D
Deuteranopia (green-blind)
#003F88
Tritanopia (blue-blind)
#583652
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #5f178a;
/* rgb */ color: rgb(95, 23, 138);
/* oklch */ color: oklch(38.8% 0.176 308.3);
Tailwind
colors: {
  custom: {
    50: '#915fad',
    500: '#5f178a',
    950: '#000000',
  },
}
SCSS
$custom: #5f178a;
$custom-light: #915fad;
$custom-dark: #000000;
JSON
{
  "hex": "#5f178a",
  "rgb": {
    "r": 95,
    "g": 23,
    "b": 138
  },
  "hsl": {
    "h": 277.565,
    "s": 71.429,
    "l": 31.569
  },
  "oklch": {
    "l": 0.38838,
    "c": 0.17573,
    "h": 308.3
  },
  "luminance": 0.04881
}

Semantic roles & 50–950 ramp

primary
#5F178A
secondary
#6EBE3F
accent
#EE3A7D
background
#F9F5FA
surface
#F2EAF4
border
#CCC6CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5F178A

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

Preview Lab → · Contrast checker → · Palette generator →

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