#5B228B#5B228B

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

Color values

HEX#5B228B
RGBrgb(91, 34, 139)
HSLhsl(273, 61%, 34%)
HSVhsv(273, 76%, 55%)
CMYKcmyk(34.5%, 75.5%, 0%, 45.5%)
CIE-LABlab(27.39, 45.40, -47.55)
CIE-LCHlch(27.39, 65.74, 313.68°)
OKLaboklab(39.44% 0.0931 -0.1353)
OKLCHoklch(39.44% 0.164 304.5)
XYZxyz(9.5455, 5.2323, 24.9281)
Luminance0.0523 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B228B #528B22
analogous
#26228B #5B228B #8B2287
triadic
#5B228B #8B5B22 #228B5B
tetradic
#5B228B #8B2622 #528B22 #22878B
square
#5B228B #8B2622 #528B22 #22878B
split-complementary
#5B228B #878B22 #228B26
monochromatic
#1B0A29 #3B165A #5B228B #7B2EBC #9953D5

Accessibility & contrast

On white

10.26
#5B228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B228B
10.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B228B#FFFFFF#000000##FFFFFF
##5B228B1.0010.262.0510.26
#FFFFFF10.261.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F8E
Deuteranopia (green-blind)
#004189
Tritanopia (blue-blind)
#523C55
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5b228b;
/* rgb */ color: rgb(91, 34, 139);
/* oklch */ color: oklch(39.4% 0.164 304.5);
Tailwind
colors: {
  custom: {
    50: '#8e63ae',
    500: '#5b228b',
    950: '#000000',
  },
}
SCSS
$custom: #5b228b;
$custom-light: #8e63ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5b228b",
  "rgb": {
    "r": 91,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 272.571,
    "s": 60.694,
    "l": 33.922
  },
  "oklch": {
    "l": 0.39437,
    "c": 0.16425,
    "h": 304.5
  },
  "luminance": 0.05232
}

Semantic roles & 50–950 ramp

primary
#5B228B
secondary
#80B850
accent
#E4448D
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5B228B

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

Preview Lab → · Contrast checker → · Palette generator →

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