#5A158A#5A158A

#5A158A is a dark, vivid violet. Relative luminance 0.045; OKLCH L 38.0% C 0.176 H 305.8°. Best body text is #FFFFFF at 11.00:1 contrast (WCAG AA passes).

Color values

HEX#5A158A
RGBrgb(90, 21, 138)
HSLhsl(275, 74%, 31%)
HSVhsv(275, 85%, 54%)
CMYKcmyk(34.8%, 84.8%, 0%, 45.9%)
CIE-LABlab(25.40, 50.06, -50.17)
CIE-LCHlch(25.40, 70.87, 314.94°)
OKLaboklab(37.99% 0.103 -0.143)
OKLCHoklch(37.99% 0.176 305.8)
XYZxyz(9.0710, 4.5450, 24.4392)
Luminance0.0454 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A158A #458A15
analogous
#20158A #5A158A #8A157F
triadic
#5A158A #8A5A15 #158A5A
tetradic
#5A158A #8A2015 #458A15 #157F8A
square
#5A158A #8A2015 #458A15 #157F8A
split-complementary
#5A158A #7F8A15 #158A20
monochromatic
#150520 #370D55 #5A158A #7D1DBF #9C39E1

Accessibility & contrast

On white

11.00
#5A158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#5A158A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A158A
11.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A158A#FFFFFF#000000##FFFFFF
##5A158A1.0011.001.9111.00
#FFFFFF11.001.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF11.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8D
Deuteranopia (green-blind)
#003C88
Tritanopia (blue-blind)
#513651
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #5a158a;
/* rgb */ color: rgb(90, 21, 138);
/* oklch */ color: oklch(38.0% 0.176 305.8);
Tailwind
colors: {
  custom: {
    50: '#8e5dad',
    500: '#5a158a',
    950: '#000000',
  },
}
SCSS
$custom: #5a158a;
$custom-light: #8e5dad;
$custom-dark: #000000;
JSON
{
  "hex": "#5a158a",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 275.385,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.37987,
    "c": 0.17622,
    "h": 305.8
  },
  "luminance": 0.04545
}

Semantic roles & 50–950 ramp

primary
#5A158A
secondary
#72BE3D
accent
#F03883
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A158A

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

Preview Lab → · Contrast checker → · Palette generator →

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