#5A158D#5A158D

#5A158D is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.3% C 0.179 H 304.7°. Best body text is #FFFFFF at 10.90:1 contrast (WCAG AA passes).

Color values

HEX#5A158D
RGBrgb(90, 21, 141)
HSLhsl(275, 74%, 32%)
HSVhsv(275, 85%, 55%)
CMYKcmyk(36.2%, 85.1%, 0%, 44.7%)
CIE-LABlab(25.66, 50.75, -51.61)
CIE-LCHlch(25.66, 72.38, 314.52°)
OKLaboklab(38.25% 0.102 -0.1472)
OKLCHoklch(38.25% 0.179 304.7)
XYZxyz(9.2912, 4.6331, 25.5989)
Luminance0.0463 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A158D #488D15
analogous
#1E158D #5A158D #8D1584
triadic
#5A158D #8D5A15 #158D5A
tetradic
#5A158D #8D1E15 #488D15 #15848D
square
#5A158D #8D1E15 #488D15 #15848D
split-complementary
#5A158D #848D15 #158D1E
monochromatic
#160522 #380D58 #5A158D #7C1DC2 #9B3BE2

Accessibility & contrast

On white

10.90
#5A158D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A158D
10.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A158D#FFFFFF#000000##FFFFFF
##5A158D1.0010.901.9310.90
#FFFFFF10.901.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B90
Deuteranopia (green-blind)
#003D8B
Tritanopia (blue-blind)
#503753
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a158d;
/* rgb */ color: rgb(90, 21, 141);
/* oklch */ color: oklch(38.3% 0.179 304.7);
Tailwind
colors: {
  custom: {
    50: '#8e5daf',
    500: '#5a158d',
    950: '#000000',
  },
}
SCSS
$custom: #5a158d;
$custom-light: #8e5daf;
$custom-dark: #000000;
JSON
{
  "hex": "#5a158d",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 141
  },
  "hsl": {
    "h": 274.5,
    "s": 74.074,
    "l": 31.765
  },
  "oklch": {
    "l": 0.38253,
    "c": 0.17911,
    "h": 304.7
  },
  "luminance": 0.04633
}

Semantic roles & 50–950 ramp

primary
#5A158D
secondary
#75C13D
accent
#F13786
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A158D

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

Preview Lab → · Contrast checker → · Palette generator →

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