#5B228C#5B228C

#5B228C is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.5% C 0.165 H 304.2°. Best body text is #FFFFFF at 10.23:1 contrast (WCAG AA passes).

Color values

HEX#5B228C
RGBrgb(91, 34, 140)
HSLhsl(272, 61%, 34%)
HSVhsv(272, 76%, 55%)
CMYKcmyk(35%, 75.7%, 0%, 45.1%)
CIE-LABlab(27.47, 45.64, -48.04)
CIE-LCHlch(27.47, 66.26, 313.54°)
OKLaboklab(39.52% 0.0929 -0.1368)
OKLCHoklch(39.52% 0.165 304.2)
XYZxyz(9.6189, 5.2617, 25.3147)
Luminance0.0526 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B228C #538C22
analogous
#26228C #5B228C #8C2288
triadic
#5B228C #8C5B22 #228C5B
tetradic
#5B228C #8C2622 #538C22 #22888C
square
#5B228C #8C2622 #538C22 #22888C
split-complementary
#5B228C #888C22 #228C26
monochromatic
#1B0A2A #3B165B #5B228C #7B2EBD #9953D5

Accessibility & contrast

On white

10.23
#5B228C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#5B228C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B228C
10.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B228C#FFFFFF#000000##FFFFFF
##5B228C1.0010.232.0510.23
#FFFFFF10.231.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408F
Deuteranopia (green-blind)
#00418A
Tritanopia (blue-blind)
#513C55
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5b228c;
/* rgb */ color: rgb(91, 34, 140);
/* oklch */ color: oklch(39.5% 0.165 304.2);
Tailwind
colors: {
  custom: {
    50: '#8e63ae',
    500: '#5b228c',
    950: '#000000',
  },
}
SCSS
$custom: #5b228c;
$custom-light: #8e63ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5b228c",
  "rgb": {
    "r": 91,
    "g": 34,
    "b": 140
  },
  "hsl": {
    "h": 272.264,
    "s": 60.92,
    "l": 34.118
  },
  "oklch": {
    "l": 0.39519,
    "c": 0.16531,
    "h": 304.2
  },
  "luminance": 0.05262
}

Semantic roles & 50–950 ramp

primary
#5B228C
secondary
#81B951
accent
#E4448E
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5B228C

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

Preview Lab → · Contrast checker → · Palette generator →

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