#5F178F#5F178F

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

Color values

HEX#5F178F
RGBrgb(95, 23, 143)
HSLhsl(276, 72%, 33%)
HSVhsv(276, 84%, 56%)
CMYKcmyk(33.6%, 83.9%, 0%, 43.9%)
CIE-LABlab(26.82, 51.35, -50.93)
CIE-LCHlch(26.82, 72.32, 315.23°)
OKLaboklab(39.27% 0.1074 -0.1451)
OKLCHoklch(39.27% 0.181 306.5)
XYZxyz(9.9825, 5.0290, 26.4261)
Luminance0.0503 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F178F #478F17
analogous
#23178F #5F178F #8F1783
triadic
#5F178F #8F5F17 #178F5F
tetradic
#5F178F #8F2317 #478F17 #17838F
square
#5F178F #8F2317 #478F17 #17838F
split-complementary
#5F178F #838F17 #178F23
monochromatic
#190626 #3C0F5A #5F178F #821FC4 #A040E0

Accessibility & contrast

On white

10.47
#5F178F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#5F178F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F178F
10.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F178F#FFFFFF#000000##FFFFFF
##5F178F1.0010.472.0110.47
#FFFFFF10.471.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D92
Deuteranopia (green-blind)
#00408D
Tritanopia (blue-blind)
#563855
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5f178f;
/* rgb */ color: rgb(95, 23, 143);
/* oklch */ color: oklch(39.3% 0.180 306.5);
Tailwind
colors: {
  custom: {
    50: '#925fb1',
    500: '#5f178f',
    950: '#000000',
  },
}
SCSS
$custom: #5f178f;
$custom-light: #925fb1;
$custom-dark: #000000;
JSON
{
  "hex": "#5f178f",
  "rgb": {
    "r": 95,
    "g": 23,
    "b": 143
  },
  "hsl": {
    "h": 276,
    "s": 72.289,
    "l": 32.549
  },
  "oklch": {
    "l": 0.39265,
    "c": 0.1805,
    "h": 306.5
  },
  "luminance": 0.05029
}

Semantic roles & 50–950 ramp

primary
#5F178F
secondary
#74C141
accent
#EF3982
background
#F9F5FB
surface
#F2EAF6
border
#CCC6D0
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5F178F

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

Preview Lab → · Contrast checker → · Palette generator →

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