#5A158E#5A158E

#5A158E is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.3% C 0.180 H 304.4°. Best body text is #FFFFFF at 10.87:1 contrast (WCAG AA passes).

Color values

HEX#5A158E
RGBrgb(90, 21, 142)
HSLhsl(274, 74%, 32%)
HSVhsv(274, 85%, 56%)
CMYKcmyk(36.6%, 85.2%, 0%, 44.3%)
CIE-LABlab(25.75, 50.98, -52.08)
CIE-LCHlch(25.75, 72.88, 314.39°)
OKLaboklab(38.34% 0.1017 -0.1486)
OKLCHoklch(38.34% 0.18 304.4)
XYZxyz(9.3660, 4.6630, 25.9926)
Luminance0.0466 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A158E #498E15
analogous
#1E158E #5A158E #8E1586
triadic
#5A158E #8E5A15 #158E5A
tetradic
#5A158E #8E1E15 #498E15 #15868E
square
#5A158E #8E1E15 #498E15 #15868E
split-complementary
#5A158E #868E15 #158E1E
monochromatic
#160523 #380D59 #5A158E #7C1DC3 #9A3BE2

Accessibility & contrast

On white

10.87
#5A158E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#5A158E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A158E
10.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A158E#FFFFFF#000000##FFFFFF
##5A158E1.0010.871.9310.87
#FFFFFF10.871.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B91
Deuteranopia (green-blind)
#003D8C
Tritanopia (blue-blind)
#503854
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a158e;
/* rgb */ color: rgb(90, 21, 142);
/* oklch */ color: oklch(38.3% 0.180 304.4);
Tailwind
colors: {
  custom: {
    50: '#8e5db0',
    500: '#5a158e',
    950: '#000000',
  },
}
SCSS
$custom: #5a158e;
$custom-light: #8e5db0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a158e",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 142
  },
  "hsl": {
    "h": 274.215,
    "s": 74.233,
    "l": 31.961
  },
  "oklch": {
    "l": 0.38343,
    "c": 0.18007,
    "h": 304.4
  },
  "luminance": 0.04663
}

Semantic roles & 50–950 ramp

primary
#5A158E
secondary
#76C23D
accent
#F13787
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5A158E

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

Preview Lab → · Contrast checker → · Palette generator →

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