#5F1796#5F1796

#5F1796 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.9% C 0.187 H 304.2°. Best body text is #FFFFFF at 10.25:1 contrast (WCAG AA passes).

Color values

HEX#5F1796
RGBrgb(95, 23, 150)
HSLhsl(274, 73%, 34%)
HSVhsv(274, 85%, 59%)
CMYKcmyk(36.7%, 84.7%, 0%, 41.2%)
CIE-LABlab(27.43, 52.94, -54.25)
CIE-LCHlch(27.43, 75.80, 314.30°)
OKLaboklab(39.88% 0.1052 -0.1548)
OKLCHoklch(39.88% 0.187 304.2)
XYZxyz(10.5295, 5.2477, 29.3064)
Luminance0.0525 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F1796 #4E9617
analogous
#201796 #5F1796 #96178E
triadic
#5F1796 #965F17 #17965F
tetradic
#5F1796 #962017 #4E9617 #178E96
square
#5F1796 #962017 #4E9617 #178E96
split-complementary
#5F1796 #8E9617 #179620
monochromatic
#1C072C #3D0F61 #5F1796 #811FCB #9E45E2

Accessibility & contrast

On white

10.25
#5F1796 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#5F1796 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F1796
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F1796#FFFFFF#000000##FFFFFF
##5F17961.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F99
Deuteranopia (green-blind)
#004194
Tritanopia (blue-blind)
#543B59
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5f1796;
/* rgb */ color: rgb(95, 23, 150);
/* oklch */ color: oklch(39.9% 0.187 304.2);
Tailwind
colors: {
  custom: {
    50: '#925fb6',
    500: '#5f1796',
    950: '#000000',
  },
}
SCSS
$custom: #5f1796;
$custom-light: #925fb6;
$custom-dark: #000000;
JSON
{
  "hex": "#5f1796",
  "rgb": {
    "r": 95,
    "g": 23,
    "b": 150
  },
  "hsl": {
    "h": 274.016,
    "s": 73.41,
    "l": 33.922
  },
  "oklch": {
    "l": 0.39878,
    "c": 0.18719,
    "h": 304.2
  },
  "luminance": 0.05248
}

Semantic roles & 50–950 ramp

primary
#5F1796
secondary
#7CC345
accent
#F03888
background
#F9F5FB
surface
#F2EAF6
border
#CCC6D0
text
#0E0511
muted
#7E7980

Preview Lab

Preview with #5F1796

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

Preview Lab → · Contrast checker → · Palette generator →

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