#5A218E#5A218E

#5A218E is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.4% C 0.168 H 303.1°. Best body text is #FFFFFF at 10.28:1 contrast (WCAG AA passes).

Color values

HEX#5A218E
RGBrgb(90, 33, 142)
HSLhsl(271, 62%, 34%)
HSVhsv(271, 77%, 56%)
CMYKcmyk(36.6%, 76.8%, 0%, 44.3%)
CIE-LABlab(27.34, 46.39, -49.49)
CIE-LCHlch(27.34, 67.84, 313.15°)
OKLaboklab(39.45% 0.0919 -0.1411)
OKLCHoklch(39.45% 0.168 303.1)
XYZxyz(9.6416, 5.2144, 26.0845)
Luminance0.0521 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A218E #558E21
analogous
#23218E #5A218E #8E218C
triadic
#5A218E #8E5A21 #218E5A
tetradic
#5A218E #8E2321 #558E21 #218C8E
square
#5A218E #8E2321 #558E21 #218C8E
split-complementary
#5A218E #8C8E21 #218E23
monochromatic
#1B0A2B #3B155C #5A218E #792DC0 #9852D7

Accessibility & contrast

On white

10.28
#5A218E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#5A218E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A218E
10.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A218E#FFFFFF#000000##FFFFFF
##5A218E1.0010.282.0410.28
#FFFFFF10.281.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004091
Deuteranopia (green-blind)
#00408C
Tritanopia (blue-blind)
#4F3D56
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a218e;
/* rgb */ color: rgb(90, 33, 142);
/* oklch */ color: oklch(39.4% 0.168 303.1);
Tailwind
colors: {
  custom: {
    50: '#8e63b0',
    500: '#5a218e',
    950: '#000000',
  },
}
SCSS
$custom: #5a218e;
$custom-light: #8e63b0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a218e",
  "rgb": {
    "r": 90,
    "g": 33,
    "b": 142
  },
  "hsl": {
    "h": 271.376,
    "s": 62.286,
    "l": 34.314
  },
  "oklch": {
    "l": 0.39449,
    "c": 0.16838,
    "h": 303.1
  },
  "luminance": 0.05214
}

Semantic roles & 50–950 ramp

primary
#5A218E
secondary
#83BA50
accent
#E54290
background
#F9F6FA
surface
#F1EBF5
border
#CBC6CF
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #5A218E

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

Preview Lab → · Contrast checker → · Palette generator →

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