#5A1F91#5A1F91

#5A1F91 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.5% C 0.174 H 302.4°. Best body text is #FFFFFF at 10.30:1 contrast (WCAG AA passes).

Color values

HEX#5A1F91
RGBrgb(90, 31, 145)
HSLhsl(271, 65%, 35%)
HSVhsv(271, 79%, 57%)
CMYKcmyk(37.9%, 78.6%, 0%, 43.1%)
CIE-LABlab(27.29, 47.99, -51.43)
CIE-LCHlch(27.29, 70.34, 313.02°)
OKLaboklab(39.5% 0.093 -0.1467)
OKLCHoklch(39.5% 0.174 302.4)
XYZxyz(9.8160, 5.1979, 27.2687)
Luminance0.0520 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F91 #56911F
analogous
#211F91 #5A1F91 #911F8F
triadic
#5A1F91 #915A1F #1F915A
tetradic
#5A1F91 #91211F #56911F #1F8F91
square
#5A1F91 #91211F #56911F #1F8F91
split-complementary
#5A1F91 #8F911F #1F9121
monochromatic
#1B092C #3B145F #5A1F91 #792AC3 #9851DA

Accessibility & contrast

On white

10.30
#5A1F91 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#5A1F91 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1F91
10.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F91#FFFFFF#000000##FFFFFF
##5A1F911.0010.302.0410.30
#FFFFFF10.301.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004094
Deuteranopia (green-blind)
#00408F
Tritanopia (blue-blind)
#4E3D57
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #5a1f91;
/* rgb */ color: rgb(90, 31, 145);
/* oklch */ color: oklch(39.5% 0.174 302.4);
Tailwind
colors: {
  custom: {
    50: '#8e62b2',
    500: '#5a1f91',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f91;
$custom-light: #8e62b2;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f91",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 145
  },
  "hsl": {
    "h": 271.053,
    "s": 64.773,
    "l": 34.51
  },
  "oklch": {
    "l": 0.39495,
    "c": 0.17372,
    "h": 302.4
  },
  "luminance": 0.05198
}

Semantic roles & 50–950 ramp

primary
#5A1F91
secondary
#84BD4F
accent
#E84091
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #5A1F91

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

Preview Lab → · Contrast checker → · Palette generator →

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