#5A2186#5A2186

#5A2186 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.8% C 0.160 H 305.8°. Best body text is #FFFFFF at 10.52:1 contrast (WCAG AA passes).

Color values

HEX#5A2186
RGBrgb(90, 33, 134)
HSLhsl(274, 60%, 33%)
HSVhsv(274, 75%, 53%)
CMYKcmyk(32.8%, 75.4%, 0%, 47.5%)
CIE-LABlab(26.69, 44.43, -45.57)
CIE-LCHlch(26.69, 63.65, 314.27°)
OKLaboklab(38.78% 0.0936 -0.1296)
OKLCHoklch(38.78% 0.16 305.8)
XYZxyz(9.0624, 4.9827, 23.0340)
Luminance0.0498 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2186 #4D8621
analogous
#272186 #5A2186 #862180
triadic
#5A2186 #865A21 #21865A
tetradic
#5A2186 #862721 #4D8621 #218086
square
#5A2186 #862721 #4D8621 #218086
split-complementary
#5A2186 #808621 #218627
monochromatic
#180924 #391555 #5A2186 #7B2DB7 #994ED3

Accessibility & contrast

On white

10.52
#5A2186 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#5A2186 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2186
10.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2186#FFFFFF#000000##FFFFFF
##5A21861.0010.522.0010.52
#FFFFFF10.521.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D89
Deuteranopia (green-blind)
#003F84
Tritanopia (blue-blind)
#523952
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5a2186;
/* rgb */ color: rgb(90, 33, 134);
/* oklch */ color: oklch(38.8% 0.160 305.8);
Tailwind
colors: {
  custom: {
    50: '#8d62aa',
    500: '#5a2186',
    950: '#000000',
  },
}
SCSS
$custom: #5a2186;
$custom-light: #8d62aa;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2186",
  "rgb": {
    "r": 90,
    "g": 33,
    "b": 134
  },
  "hsl": {
    "h": 273.861,
    "s": 60.479,
    "l": 32.745
  },
  "oklch": {
    "l": 0.38785,
    "c": 0.15985,
    "h": 305.8
  },
  "luminance": 0.04983
}

Semantic roles & 50–950 ramp

primary
#5A2186
secondary
#7BB74C
accent
#E4448A
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0510
muted
#7E7A7F

Preview Lab

Preview with #5A2186

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

Preview Lab → · Contrast checker → · Palette generator →

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