#5B228D#5B228D

#5B228D is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.6% C 0.166 H 303.8°. Best body text is #FFFFFF at 10.20:1 contrast (WCAG AA passes).

Color values

HEX#5B228D
RGBrgb(91, 34, 141)
HSLhsl(272, 61%, 34%)
HSVhsv(272, 76%, 55%)
CMYKcmyk(35.5%, 75.9%, 0%, 44.7%)
CIE-LABlab(27.55, 45.89, -48.52)
CIE-LCHlch(27.55, 66.79, 313.40°)
OKLaboklab(39.6% 0.0926 -0.1382)
OKLCHoklch(39.6% 0.166 303.8)
XYZxyz(9.6930, 5.2913, 25.7048)
Luminance0.0529 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B228D #548D22
analogous
#26228D #5B228D #8D228A
triadic
#5B228D #8D5B22 #228D5B
tetradic
#5B228D #8D2622 #548D22 #228A8D
square
#5B228D #8D2622 #548D22 #228A8D
split-complementary
#5B228D #8A8D22 #228D26
monochromatic
#1B0A2A #3B165C #5B228D #7B2EBE #9954D6

Accessibility & contrast

On white

10.20
#5B228D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#5B228D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B228D
10.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B228D#FFFFFF#000000##FFFFFF
##5B228D1.0010.202.0610.20
#FFFFFF10.201.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004090
Deuteranopia (green-blind)
#00418B
Tritanopia (blue-blind)
#513D56
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5b228d;
/* rgb */ color: rgb(91, 34, 141);
/* oklch */ color: oklch(39.6% 0.166 303.8);
Tailwind
colors: {
  custom: {
    50: '#8e63af',
    500: '#5b228d',
    950: '#000000',
  },
}
SCSS
$custom: #5b228d;
$custom-light: #8e63af;
$custom-dark: #000000;
JSON
{
  "hex": "#5b228d",
  "rgb": {
    "r": 91,
    "g": 34,
    "b": 141
  },
  "hsl": {
    "h": 271.963,
    "s": 61.143,
    "l": 34.314
  },
  "oklch": {
    "l": 0.39602,
    "c": 0.16638,
    "h": 303.8
  },
  "luminance": 0.05291
}

Semantic roles & 50–950 ramp

primary
#5B228D
secondary
#82B951
accent
#E4448F
background
#F9F6FA
surface
#F1EBF5
border
#CBC6CF
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5B228D

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

Preview Lab → · Contrast checker → · Palette generator →

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