#5A218B#5A218B

#5A218B is a dark, vivid violet. Relative luminance 0.051; OKLCH L 39.2% C 0.165 H 304.1°. Best body text is #FFFFFF at 10.37:1 contrast (WCAG AA passes).

Color values

HEX#5A218B
RGBrgb(90, 33, 139)
HSLhsl(272, 62%, 34%)
HSVhsv(272, 76%, 55%)
CMYKcmyk(35.3%, 76.3%, 0%, 45.5%)
CIE-LABlab(27.09, 45.65, -48.04)
CIE-LCHlch(27.09, 66.27, 313.54°)
OKLaboklab(39.2% 0.0926 -0.1368)
OKLCHoklch(39.2% 0.165 304.1)
XYZxyz(9.4194, 5.1255, 24.9142)
Luminance0.0512 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A218B #528B21
analogous
#25218B #5A218B #8B2187
triadic
#5A218B #8B5A21 #218B5A
tetradic
#5A218B #8B2521 #528B21 #21878B
square
#5A218B #8B2521 #528B21 #21878B
split-complementary
#5A218B #878B21 #218B25
monochromatic
#1A0A28 #3A155A #5A218B #7A2DBC #9851D6

Accessibility & contrast

On white

10.37
#5A218B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#5A218B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A218B
10.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A218B#FFFFFF#000000##FFFFFF
##5A218B1.0010.372.0310.37
#FFFFFF10.371.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F8E
Deuteranopia (green-blind)
#004089
Tritanopia (blue-blind)
#503B54
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #5a218b;
/* rgb */ color: rgb(90, 33, 139);
/* oklch */ color: oklch(39.2% 0.165 304.1);
Tailwind
colors: {
  custom: {
    50: '#8e62ae',
    500: '#5a218b',
    950: '#000000',
  },
}
SCSS
$custom: #5a218b;
$custom-light: #8e62ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a218b",
  "rgb": {
    "r": 90,
    "g": 33,
    "b": 139
  },
  "hsl": {
    "h": 272.264,
    "s": 61.628,
    "l": 33.725
  },
  "oklch": {
    "l": 0.39197,
    "c": 0.16519,
    "h": 304.1
  },
  "luminance": 0.05125
}

Semantic roles & 50–950 ramp

primary
#5A218B
secondary
#80B94F
accent
#E5438E
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0510
muted
#7E7A7F

Preview Lab

Preview with #5A218B

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

Preview Lab → · Contrast checker → · Palette generator →

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