#5A1FA6#5A1FA6

#5A1FA6 is a dark, vivid violet. Relative luminance 0.059; OKLCH L 41.4% C 0.196 H 296.3°. Best body text is #FFFFFF at 9.63:1 contrast (WCAG AA passes).

Color values

HEX#5A1FA6
RGBrgb(90, 31, 166)
HSLhsl(266, 69%, 39%)
HSVhsv(266, 81%, 65%)
CMYKcmyk(45.8%, 81.3%, 0%, 34.9%)
CIE-LABlab(29.18, 53.20, -61.17)
CIE-LCHlch(29.18, 81.07, 311.02°)
OKLaboklab(41.39% 0.0867 -0.1753)
OKLCHoklch(41.39% 0.196 296.3)
XYZxyz(11.5875, 5.9065, 36.5986)
Luminance0.0591 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1FA6 #6BA61F
analogous
#1F27A6 #5A1FA6 #9D1FA6
triadic
#5A1FA6 #A65A1F #1FA65A
tetradic
#5A1FA6 #A61F27 #6BA61F #1FA69D
square
#5A1FA6 #A61F27 #6BA61F #1FA69D
split-complementary
#5A1FA6 #A69D1F #27A61F
monochromatic
#220C3F #3E1572 #5A1FA6 #762BD7 #975EE1

Accessibility & contrast

On white

9.63
#5A1FA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.18
#5A1FA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1FA6
9.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1FA6#FFFFFF#000000##FFFFFF
##5A1FA61.009.632.189.63
#FFFFFF9.631.0021.001.00
#0000002.1821.001.0021.00
##FFFFFF9.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0045AA
Deuteranopia (green-blind)
#0043A4
Tritanopia (blue-blind)
#454663
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #5a1fa6;
/* rgb */ color: rgb(90, 31, 166);
/* oklch */ color: oklch(41.4% 0.196 296.3);
Tailwind
colors: {
  custom: {
    50: '#9163c2',
    500: '#5a1fa6',
    950: '#000000',
  },
}
SCSS
$custom: #5a1fa6;
$custom-light: #9163c2;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1fa6",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 166
  },
  "hsl": {
    "h": 266.222,
    "s": 68.528,
    "l": 38.627
  },
  "oklch": {
    "l": 0.41387,
    "c": 0.1956,
    "h": 296.3
  },
  "luminance": 0.05907
}

Semantic roles & 50–950 ramp

primary
#5A1FA6
secondary
#97C55B
accent
#EB3C9F
background
#F9F6FC
surface
#F2EBF8
border
#CCC6D1
text
#0E0612
muted
#7E7A81

Preview Lab

Preview with #5A1FA6

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

Preview Lab → · Contrast checker → · Palette generator →

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