#5A1F96#5A1F96

#5A1F96 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.9% C 0.179 H 300.8°. Best body text is #FFFFFF at 10.14:1 contrast (WCAG AA passes).

Color values

HEX#5A1F96
RGBrgb(90, 31, 150)
HSLhsl(270, 66%, 35%)
HSVhsv(270, 79%, 59%)
CMYKcmyk(40%, 79.3%, 0%, 41.2%)
CIE-LABlab(27.72, 49.22, -53.80)
CIE-LCHlch(27.72, 72.91, 312.45°)
OKLaboklab(39.93% 0.0916 -0.1537)
OKLCHoklch(39.93% 0.179 300.8)
XYZxyz(10.2101, 5.3556, 29.3441)
Luminance0.0536 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F96 #5B961F
analogous
#1F1F96 #5A1F96 #951F96
triadic
#5A1F96 #965A1F #1F965A
tetradic
#5A1F96 #961F1F #5B961F #1F9695
square
#5A1F96 #961F1F #5B961F #1F9695
split-complementary
#5A1F96 #96951F #1F961F
monochromatic
#1D0A31 #3C1563 #5A1F96 #7829C9 #9754DC

Accessibility & contrast

On white

10.14
#5A1F96 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#5A1F96 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1F96
10.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F96#FFFFFF#000000##FFFFFF
##5A1F961.0010.142.0710.14
#FFFFFF10.141.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004199
Deuteranopia (green-blind)
#004194
Tritanopia (blue-blind)
#4C3F5A
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a1f96;
/* rgb */ color: rgb(90, 31, 150);
/* oklch */ color: oklch(39.9% 0.179 300.8);
Tailwind
colors: {
  custom: {
    50: '#8f62b6',
    500: '#5a1f96',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f96;
$custom-light: #8f62b6;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f96",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 150
  },
  "hsl": {
    "h": 269.748,
    "s": 65.746,
    "l": 35.49
  },
  "oklch": {
    "l": 0.39933,
    "c": 0.17894,
    "h": 300.8
  },
  "luminance": 0.05356
}

Semantic roles & 50–950 ramp

primary
#5A1F96
secondary
#89BF52
accent
#E93F95
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #5A1F96

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

Preview Lab → · Contrast checker → · Palette generator →

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