#5B228A#5B228A

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

Color values

HEX#5B228A
RGBrgb(91, 34, 138)
HSLhsl(273, 60%, 34%)
HSVhsv(273, 75%, 54%)
CMYKcmyk(34.1%, 75.4%, 0%, 45.9%)
CIE-LABlab(27.31, 45.16, -47.06)
CIE-LCHlch(27.31, 65.22, 313.82°)
OKLaboklab(39.36% 0.0933 -0.1339)
OKLCHoklch(39.36% 0.163 304.9)
XYZxyz(9.4728, 5.2032, 24.5451)
Luminance0.0520 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B228A #518A22
analogous
#27228A #5B228A #8A2285
triadic
#5B228A #8A5B22 #228A5B
tetradic
#5B228A #8A2722 #518A22 #22858A
square
#5B228A #8A2722 #518A22 #22858A
split-complementary
#5B228A #858A22 #228A27
monochromatic
#1A0A28 #3B1659 #5B228A #7B2EBB #9952D4

Accessibility & contrast

On white

10.29
#5B228A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#5B228A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B228A
10.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B228A#FFFFFF#000000##FFFFFF
##5B228A1.0010.292.0410.29
#FFFFFF10.291.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F8D
Deuteranopia (green-blind)
#004188
Tritanopia (blue-blind)
#523B54
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #5b228a;
/* rgb */ color: rgb(91, 34, 138);
/* oklch */ color: oklch(39.4% 0.163 304.9);
Tailwind
colors: {
  custom: {
    50: '#8e63ad',
    500: '#5b228a',
    950: '#000000',
  },
}
SCSS
$custom: #5b228a;
$custom-light: #8e63ad;
$custom-dark: #000000;
JSON
{
  "hex": "#5b228a",
  "rgb": {
    "r": 91,
    "g": 34,
    "b": 138
  },
  "hsl": {
    "h": 272.885,
    "s": 60.465,
    "l": 33.725
  },
  "oklch": {
    "l": 0.39355,
    "c": 0.16317,
    "h": 304.9
  },
  "luminance": 0.05203
}

Semantic roles & 50–950 ramp

primary
#5B228A
secondary
#7FB850
accent
#E4448C
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5B228A

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

Preview Lab → · Contrast checker → · Palette generator →

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