#5B228E#5B228E

#5B228E is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.7% C 0.167 H 303.5°. Best body text is #FFFFFF at 10.17:1 contrast (WCAG AA passes).

Color values

HEX#5B228E
RGBrgb(91, 34, 142)
HSLhsl(272, 61%, 35%)
HSVhsv(272, 76%, 56%)
CMYKcmyk(35.9%, 76.1%, 0%, 44.3%)
CIE-LABlab(27.63, 46.14, -49.01)
CIE-LCHlch(27.63, 67.31, 313.27°)
OKLaboklab(39.69% 0.0924 -0.1396)
OKLCHoklch(39.69% 0.167 303.5)
XYZxyz(9.7678, 5.3212, 26.0984)
Luminance0.0532 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B228E #558E22
analogous
#25228E #5B228E #8E228B
triadic
#5B228E #8E5B22 #228E5B
tetradic
#5B228E #8E2522 #558E22 #228B8E
square
#5B228E #8E2522 #558E22 #228B8E
split-complementary
#5B228E #8B8E22 #228E25
monochromatic
#1C0A2B #3B165D #5B228E #7B2EBF #9954D6

Accessibility & contrast

On white

10.17
#5B228E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B228E
10.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B228E#FFFFFF#000000##FFFFFF
##5B228E1.0010.172.0610.17
#FFFFFF10.171.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.171.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5b228e;
/* rgb */ color: rgb(91, 34, 142);
/* oklch */ color: oklch(39.7% 0.167 303.5);
Tailwind
colors: {
  custom: {
    50: '#8e63b0',
    500: '#5b228e',
    950: '#000000',
  },
}
SCSS
$custom: #5b228e;
$custom-light: #8e63b0;
$custom-dark: #000000;
JSON
{
  "hex": "#5b228e",
  "rgb": {
    "r": 91,
    "g": 34,
    "b": 142
  },
  "hsl": {
    "h": 271.667,
    "s": 61.364,
    "l": 34.51
  },
  "oklch": {
    "l": 0.39686,
    "c": 0.16745,
    "h": 303.5
  },
  "luminance": 0.05321
}

Semantic roles & 50–950 ramp

primary
#5B228E
secondary
#83BA52
accent
#E4438F
background
#F9F6FA
surface
#F1EBF5
border
#CBC6CF
text
#0D0611
muted
#7E7A80

Preview Lab

Preview with #5B228E

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

Preview Lab → · Contrast checker → · Palette generator →

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