#5A158C#5A158C

#5A158C is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.2% C 0.178 H 305.1°. Best body text is #FFFFFF at 10.93:1 contrast (WCAG AA passes).

Color values

HEX#5A158C
RGBrgb(90, 21, 140)
HSLhsl(275, 74%, 32%)
HSVhsv(275, 85%, 55%)
CMYKcmyk(35.7%, 85%, 0%, 45.1%)
CIE-LABlab(25.57, 50.52, -51.13)
CIE-LCHlch(25.57, 71.88, 314.66°)
OKLaboklab(38.16% 0.1024 -0.1458)
OKLCHoklch(38.16% 0.178 305.1)
XYZxyz(9.2172, 4.6035, 25.2088)
Luminance0.0460 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A158C #478C15
analogous
#1F158C #5A158C #8C1583
triadic
#5A158C #8C5A15 #158C5A
tetradic
#5A158C #8C1F15 #478C15 #15838C
square
#5A158C #8C1F15 #478C15 #15838C
split-complementary
#5A158C #838C15 #158C1F
monochromatic
#160522 #380D57 #5A158C #7C1DC1 #9B3AE1

Accessibility & contrast

On white

10.93
#5A158C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#5A158C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A158C
10.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A158C#FFFFFF#000000##FFFFFF
##5A158C1.0010.931.9210.93
#FFFFFF10.931.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8F
Deuteranopia (green-blind)
#003D8A
Tritanopia (blue-blind)
#503752
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a158c;
/* rgb */ color: rgb(90, 21, 140);
/* oklch */ color: oklch(38.2% 0.178 305.1);
Tailwind
colors: {
  custom: {
    50: '#8e5daf',
    500: '#5a158c',
    950: '#000000',
  },
}
SCSS
$custom: #5a158c;
$custom-light: #8e5daf;
$custom-dark: #000000;
JSON
{
  "hex": "#5a158c",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 140
  },
  "hsl": {
    "h": 274.79,
    "s": 73.913,
    "l": 31.569
  },
  "oklch": {
    "l": 0.38164,
    "c": 0.17814,
    "h": 305.1
  },
  "luminance": 0.04603
}

Semantic roles & 50–950 ramp

primary
#5A158C
secondary
#74C03D
accent
#F13785
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A158C

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

Preview Lab → · Contrast checker → · Palette generator →

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