#5A1F97#5A1F97

#5A1F97 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 40.0% C 0.180 H 300.5°. Best body text is #FFFFFF at 10.11:1 contrast (WCAG AA passes).

Color values

HEX#5A1F97
RGBrgb(90, 31, 151)
HSLhsl(270, 66%, 36%)
HSVhsv(270, 79%, 59%)
CMYKcmyk(40.4%, 79.5%, 0%, 40.8%)
CIE-LABlab(27.81, 49.46, -54.27)
CIE-LCHlch(27.81, 73.43, 312.35°)
OKLaboklab(40.02% 0.0913 -0.1551)
OKLCHoklch(40.02% 0.18 300.5)
XYZxyz(10.2910, 5.3879, 29.7699)
Luminance0.0539 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F97 #5C971F
analogous
#1F2097 #5A1F97 #961F97
triadic
#5A1F97 #975A1F #1F975A
tetradic
#5A1F97 #971F20 #5C971F #1F9796
square
#5A1F97 #971F20 #5C971F #1F9796
split-complementary
#5A1F97 #97961F #20971F
monochromatic
#1D0A31 #3C1564 #5A1F97 #7829CA #9754DC

Accessibility & contrast

On white

10.11
#5A1F97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#5A1F97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1F97
10.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F97#FFFFFF#000000##FFFFFF
##5A1F971.0010.112.0810.11
#FFFFFF10.111.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419A
Deuteranopia (green-blind)
#004195
Tritanopia (blue-blind)
#4C3F5B
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #5a1f97;
/* rgb */ color: rgb(90, 31, 151);
/* oklch */ color: oklch(40.0% 0.180 300.5);
Tailwind
colors: {
  custom: {
    50: '#8f62b7',
    500: '#5a1f97',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f97;
$custom-light: #8f62b7;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f97",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 151
  },
  "hsl": {
    "h": 269.5,
    "s": 65.934,
    "l": 35.686
  },
  "oklch": {
    "l": 0.40021,
    "c": 0.17998,
    "h": 300.5
  },
  "luminance": 0.05388
}

Semantic roles & 50–950 ramp

primary
#5A1F97
secondary
#8ABF52
accent
#E93F95
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #5A1F97

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

Preview Lab → · Contrast checker → · Palette generator →

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