#5F178D#5F178D

#5F178D is a dark, vivid violet. Relative luminance 0.050; OKLCH L 39.1% C 0.179 H 307.2°. Best body text is #FFFFFF at 10.53:1 contrast (WCAG AA passes).

Color values

HEX#5F178D
RGBrgb(95, 23, 141)
HSLhsl(277, 72%, 32%)
HSVhsv(277, 84%, 55%)
CMYKcmyk(32.6%, 83.7%, 0%, 44.7%)
CIE-LABlab(26.65, 50.90, -49.97)
CIE-LCHlch(26.65, 71.33, 315.53°)
OKLaboklab(39.09% 0.108 -0.1422)
OKLCHoklch(39.09% 0.179 307.2)
XYZxyz(9.8324, 4.9689, 25.6353)
Luminance0.0497 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F178D #458D17
analogous
#24178D #5F178D #8D1780
triadic
#5F178D #8D5F17 #178D5F
tetradic
#5F178D #8D2417 #458D17 #17808D
square
#5F178D #8D2417 #458D17 #17808D
split-complementary
#5F178D #808D17 #178D24
monochromatic
#180624 #3C0E58 #5F178D #8220C2 #A13FE0

Accessibility & contrast

On white

10.53
#5F178D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5F178D
10.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F178D#FFFFFF#000000##FFFFFF
##5F178D1.0010.531.9910.53
#FFFFFF10.531.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.531.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5f178d;
/* rgb */ color: rgb(95, 23, 141);
/* oklch */ color: oklch(39.1% 0.179 307.2);
Tailwind
colors: {
  custom: {
    50: '#925faf',
    500: '#5f178d',
    950: '#000000',
  },
}
SCSS
$custom: #5f178d;
$custom-light: #925faf;
$custom-dark: #000000;
JSON
{
  "hex": "#5f178d",
  "rgb": {
    "r": 95,
    "g": 23,
    "b": 141
  },
  "hsl": {
    "h": 276.61,
    "s": 71.951,
    "l": 32.157
  },
  "oklch": {
    "l": 0.39093,
    "c": 0.17859,
    "h": 307.2
  },
  "luminance": 0.04969
}

Semantic roles & 50–950 ramp

primary
#5F178D
secondary
#72C040
accent
#EF3980
background
#F9F5FA
surface
#F2EAF5
border
#CCC6CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5F178D

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

Preview Lab → · Contrast checker → · Palette generator →

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