#5B228F#5B228F

#5B228F is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.8% C 0.169 H 303.2°. Best body text is #FFFFFF at 10.14:1 contrast (WCAG AA passes).

Color values

HEX#5B228F
RGBrgb(91, 34, 143)
HSLhsl(271, 62%, 35%)
HSVhsv(271, 76%, 56%)
CMYKcmyk(36.4%, 76.2%, 0%, 43.9%)
CIE-LABlab(27.71, 46.38, -49.50)
CIE-LCHlch(27.71, 67.83, 313.14°)
OKLaboklab(39.77% 0.0922 -0.1411)
OKLCHoklch(39.77% 0.169 303.2)
XYZxyz(9.8432, 5.3514, 26.4956)
Luminance0.0535 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B228F #568F22
analogous
#24228F #5B228F #8F228D
triadic
#5B228F #8F5B22 #228F5B
tetradic
#5B228F #8F2422 #568F22 #228D8F
square
#5B228F #8F2422 #568F22 #228D8F
split-complementary
#5B228F #8D8F22 #228F24
monochromatic
#1C0A2C #3C165E #5B228F #7A2EC0 #9955D7

Accessibility & contrast

On white

10.14
#5B228F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#5B228F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B228F
10.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B228F#FFFFFF#000000##FFFFFF
##5B228F1.0010.142.0710.14
#FFFFFF10.141.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004092
Deuteranopia (green-blind)
#00418D
Tritanopia (blue-blind)
#503D57
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5b228f;
/* rgb */ color: rgb(91, 34, 143);
/* oklch */ color: oklch(39.8% 0.169 303.2);
Tailwind
colors: {
  custom: {
    50: '#8f63b1',
    500: '#5b228f',
    950: '#000000',
  },
}
SCSS
$custom: #5b228f;
$custom-light: #8f63b1;
$custom-dark: #000000;
JSON
{
  "hex": "#5b228f",
  "rgb": {
    "r": 91,
    "g": 34,
    "b": 143
  },
  "hsl": {
    "h": 271.376,
    "s": 61.582,
    "l": 34.706
  },
  "oklch": {
    "l": 0.39769,
    "c": 0.16852,
    "h": 303.2
  },
  "luminance": 0.05351
}

Semantic roles & 50–950 ramp

primary
#5B228F
secondary
#84BA52
accent
#E54390
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0611
muted
#7E7A80

Preview Lab

Preview with #5B228F

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

Preview Lab → · Contrast checker → · Palette generator →

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