#5F178B#5F178B

#5F178B is a dark, vivid violet. Relative luminance 0.049; OKLCH L 38.9% C 0.177 H 307.9°. Best body text is #FFFFFF at 10.60:1 contrast (WCAG AA passes).

Color values

HEX#5F178B
RGBrgb(95, 23, 139)
HSLhsl(277, 72%, 32%)
HSVhsv(277, 83%, 55%)
CMYKcmyk(31.7%, 83.5%, 0%, 45.5%)
CIE-LABlab(26.48, 50.45, -49.00)
CIE-LCHlch(26.48, 70.33, 315.83°)
OKLaboklab(38.92% 0.1086 -0.1394)
OKLCHoklch(38.92% 0.177 307.9)
XYZxyz(9.6849, 4.9099, 24.8586)
Luminance0.0491 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F178B #438B17
analogous
#25178B #5F178B #8B177D
triadic
#5F178B #8B5F17 #178B5F
tetradic
#5F178B #8B2517 #438B17 #177D8B
square
#5F178B #8B2517 #438B17 #177D8B
split-complementary
#5F178B #7D8B17 #178B25
monochromatic
#170622 #3B0E56 #5F178B #8320C0 #A23DDF

Accessibility & contrast

On white

10.60
#5F178B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5F178B
10.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F178B#FFFFFF#000000##FFFFFF
##5F178B1.0010.601.9810.60
#FFFFFF10.601.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8E
Deuteranopia (green-blind)
#003F89
Tritanopia (blue-blind)
#583652
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5f178b;
/* rgb */ color: rgb(95, 23, 139);
/* oklch */ color: oklch(38.9% 0.177 307.9);
Tailwind
colors: {
  custom: {
    50: '#915fae',
    500: '#5f178b',
    950: '#000000',
  },
}
SCSS
$custom: #5f178b;
$custom-light: #915fae;
$custom-dark: #000000;
JSON
{
  "hex": "#5f178b",
  "rgb": {
    "r": 95,
    "g": 23,
    "b": 139
  },
  "hsl": {
    "h": 277.241,
    "s": 71.605,
    "l": 31.765
  },
  "oklch": {
    "l": 0.38922,
    "c": 0.17668,
    "h": 307.9
  },
  "luminance": 0.0491
}

Semantic roles & 50–950 ramp

primary
#5F178B
secondary
#70BF3F
accent
#EE397E
background
#F9F5FA
surface
#F2EAF4
border
#CCC6CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5F178B

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

Preview Lab → · Contrast checker → · Palette generator →

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