#5A158F#5A158F

#5A158F is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.4% C 0.181 H 304.1°. Best body text is #FFFFFF at 10.83:1 contrast (WCAG AA passes).

Color values

HEX#5A158F
RGBrgb(90, 21, 143)
HSLhsl(274, 74%, 32%)
HSVhsv(274, 85%, 56%)
CMYKcmyk(37.1%, 85.3%, 0%, 43.9%)
CIE-LABlab(25.84, 51.21, -52.56)
CIE-LCHlch(25.84, 73.38, 314.26°)
OKLaboklab(38.43% 0.1014 -0.15)
OKLCHoklch(38.43% 0.181 304.1)
XYZxyz(9.4414, 4.6932, 26.3898)
Luminance0.0469 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A158F #4A8F15
analogous
#1D158F #5A158F #8F1587
triadic
#5A158F #8F5A15 #158F5A
tetradic
#5A158F #8F1D15 #4A8F15 #15878F
square
#5A158F #8F1D15 #4A8F15 #15878F
split-complementary
#5A158F #878F15 #158F1D
monochromatic
#170524 #380D5A #5A158F #7C1DC4 #9A3CE2

Accessibility & contrast

On white

10.83
#5A158F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#5A158F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A158F
10.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A158F#FFFFFF#000000##FFFFFF
##5A158F1.0010.831.9410.83
#FFFFFF10.831.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C92
Deuteranopia (green-blind)
#003D8D
Tritanopia (blue-blind)
#4F3854
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a158f;
/* rgb */ color: rgb(90, 21, 143);
/* oklch */ color: oklch(38.4% 0.181 304.1);
Tailwind
colors: {
  custom: {
    50: '#8f5db1',
    500: '#5a158f',
    950: '#000000',
  },
}
SCSS
$custom: #5a158f;
$custom-light: #8f5db1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a158f",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 143
  },
  "hsl": {
    "h": 273.934,
    "s": 74.39,
    "l": 32.157
  },
  "oklch": {
    "l": 0.38432,
    "c": 0.18104,
    "h": 304.1
  },
  "luminance": 0.04693
}

Semantic roles & 50–950 ramp

primary
#5A158F
secondary
#77C23E
accent
#F13788
background
#F9F5FB
surface
#F1E9F6
border
#CBC5D0
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5A158F

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

Preview Lab → · Contrast checker → · Palette generator →

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