#5A138C#5A138C

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

Color values

HEX#5A138C
RGBrgb(90, 19, 140)
HSLhsl(275, 76%, 31%)
HSVhsv(275, 86%, 55%)
CMYKcmyk(35.7%, 86.4%, 0%, 45.1%)
CIE-LABlab(25.36, 51.14, -51.48)
CIE-LCHlch(25.36, 72.57, 314.81°)
OKLaboklab(38.02% 0.1037 -0.1468)
OKLCHoklch(38.02% 0.18 305.2)
XYZxyz(9.1819, 4.5329, 25.1971)
Luminance0.0453 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A138C #458C13
analogous
#1E138C #5A138C #8C1381
triadic
#5A138C #8C5A13 #138C5A
tetradic
#5A138C #8C1E13 #458C13 #13818C
square
#5A138C #8C1E13 #458C13 #13818C
split-complementary
#5A138C #818C13 #138C1E
monochromatic
#150420 #370C56 #5A138C #7D1AC2 #9C36E4

Accessibility & contrast

On white

11.01
#5A138C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A138C
11.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A138C#FFFFFF#000000##FFFFFF
##5A138C1.0011.011.9111.01
#FFFFFF11.011.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF11.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8F
Deuteranopia (green-blind)
#003C8A
Tritanopia (blue-blind)
#503652
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #5a138c;
/* rgb */ color: rgb(90, 19, 140);
/* oklch */ color: oklch(38.0% 0.180 305.2);
Tailwind
colors: {
  custom: {
    50: '#8e5caf',
    500: '#5a138c',
    950: '#000000',
  },
}
SCSS
$custom: #5a138c;
$custom-light: #8e5caf;
$custom-dark: #000000;
JSON
{
  "hex": "#5a138c",
  "rgb": {
    "r": 90,
    "g": 19,
    "b": 140
  },
  "hsl": {
    "h": 275.207,
    "s": 76.101,
    "l": 31.176
  },
  "oklch": {
    "l": 0.38016,
    "c": 0.17975,
    "h": 305.2
  },
  "luminance": 0.04533
}

Semantic roles & 50–950 ramp

primary
#5A138C
secondary
#72C03B
accent
#F33583
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A138C

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

Preview Lab → · Contrast checker → · Palette generator →

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