#5A217B#5A217B

#5A217B is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.9% C 0.148 H 310.1°. Best body text is #FFFFFF at 10.83:1 contrast (WCAG AA passes).

Color values

HEX#5A217B
RGBrgb(90, 33, 123)
HSLhsl(278, 58%, 31%)
HSVhsv(278, 73%, 48%)
CMYKcmyk(26.8%, 73.2%, 0%, 51.8%)
CIE-LABlab(25.84, 41.80, -40.02)
CIE-LCHlch(25.84, 57.87, 316.25°)
OKLaboklab(37.92% 0.0955 -0.1132)
OKLCHoklch(37.92% 0.148 310.1)
XYZxyz(8.3348, 4.6916, 19.2016)
Luminance0.0469 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A217B #427B21
analogous
#2D217B #5A217B #7B216F
triadic
#5A217B #7B5A21 #217B5A
tetradic
#5A217B #7B2D21 #427B21 #216F7B
square
#5A217B #7B2D21 #427B21 #216F7B
split-complementary
#5A217B #6F7B21 #217B2D
monochromatic
#13071A #37144B #5A217B #7D2EAB #9D48CE

Accessibility & contrast

On white

10.83
#5A217B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#5A217B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A217B
10.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A217B#FFFFFF#000000##FFFFFF
##5A217B1.0010.831.9410.83
#FFFFFF10.831.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B7E
Deuteranopia (green-blind)
#113E79
Tritanopia (blue-blind)
#55354B
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a217b;
/* rgb */ color: rgb(90, 33, 123);
/* oklch */ color: oklch(37.9% 0.148 310.1);
Tailwind
colors: {
  custom: {
    50: '#8c62a2',
    500: '#5a217b',
    950: '#000000',
  },
}
SCSS
$custom: #5a217b;
$custom-light: #8c62a2;
$custom-dark: #000000;
JSON
{
  "hex": "#5a217b",
  "rgb": {
    "r": 90,
    "g": 33,
    "b": 123
  },
  "hsl": {
    "h": 278,
    "s": 57.692,
    "l": 30.588
  },
  "oklch": {
    "l": 0.37916,
    "c": 0.14812,
    "h": 310.1
  },
  "luminance": 0.04691
}

Semantic roles & 50–950 ramp

primary
#5A217B
secondary
#6FAE4A
accent
#E1477F
background
#F8F6FA
surface
#F0EBF3
border
#CBC6CD
text
#0C050F
muted
#7D7A7F

Preview Lab

Preview with #5A217B

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

Preview Lab → · Contrast checker → · Palette generator →

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