#5A187F#5A187F

#5A187F is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.3% C 0.163 H 309.6°. Best body text is #FFFFFF at 11.22:1 contrast (WCAG AA passes).

Color values

HEX#5A187F
RGBrgb(90, 24, 127)
HSLhsl(278, 68%, 30%)
HSVhsv(278, 81%, 50%)
CMYKcmyk(29.1%, 81.1%, 0%, 50.2%)
CIE-LABlab(24.83, 46.50, -44.19)
CIE-LCHlch(24.83, 64.15, 316.46°)
OKLaboklab(37.3% 0.1037 -0.1254)
OKLCHoklch(37.3% 0.163 309.6)
XYZxyz(8.3731, 4.3594, 20.4749)
Luminance0.0436 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A187F #3D7F18
analogous
#27187F #5A187F #7F1870
triadic
#5A187F #7F5A18 #187F5A
tetradic
#5A187F #7F2718 #3D7F18 #18707F
square
#5A187F #7F2718 #3D7F18 #18707F
split-complementary
#5A187F #707F18 #187F27
monochromatic
#12051A #360E4C #5A187F #7E22B2 #9F38D9

Accessibility & contrast

On white

11.22
#5A187F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#5A187F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A187F
11.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A187F#FFFFFF#000000##FFFFFF
##5A187F1.0011.221.8711.22
#FFFFFF11.221.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003882
Deuteranopia (green-blind)
#003C7D
Tritanopia (blue-blind)
#54324B
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #5a187f;
/* rgb */ color: rgb(90, 24, 127);
/* oklch */ color: oklch(37.3% 0.163 309.6);
Tailwind
colors: {
  custom: {
    50: '#8d5ea5',
    500: '#5a187f',
    950: '#000000',
  },
}
SCSS
$custom: #5a187f;
$custom-light: #8d5ea5;
$custom-dark: #000000;
JSON
{
  "hex": "#5a187f",
  "rgb": {
    "r": 90,
    "g": 24,
    "b": 127
  },
  "hsl": {
    "h": 278.447,
    "s": 68.212,
    "l": 29.608
  },
  "oklch": {
    "l": 0.37299,
    "c": 0.16274,
    "h": 309.6
  },
  "luminance": 0.04359
}

Semantic roles & 50–950 ramp

primary
#5A187F
secondary
#69B33F
accent
#EB3D7B
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D050F
muted
#7E797F

Preview Lab

Preview with #5A187F

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

Preview Lab → · Contrast checker → · Palette generator →

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