#5B238B#5B238B

#5B238B is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.6% C 0.163 H 304.4°. Best body text is #FFFFFF at 10.20:1 contrast (WCAG AA passes).

Color values

HEX#5B238B
RGBrgb(91, 35, 139)
HSLhsl(272, 60%, 34%)
HSVhsv(272, 75%, 55%)
CMYKcmyk(34.5%, 74.8%, 0%, 45.5%)
CIE-LABlab(27.55, 44.95, -47.29)
CIE-LCHlch(27.55, 65.24, 313.55°)
OKLaboklab(39.55% 0.0921 -0.1346)
OKLCHoklch(39.55% 0.163 304.4)
XYZxyz(9.5746, 5.2903, 24.9378)
Luminance0.0529 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B238B #538B23
analogous
#27238B #5B238B #8B2387
triadic
#5B238B #8B5B23 #238B5B
tetradic
#5B238B #8B2723 #538B23 #23878B
square
#5B238B #8B2723 #538B23 #23878B
split-complementary
#5B238B #878B23 #238B27
monochromatic
#1B0A29 #3B175A #5B238B #7B2FBC #9954D4

Accessibility & contrast

On white

10.20
#5B238B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B238B
10.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B238B#FFFFFF#000000##FFFFFF
##5B238B1.0010.202.0610.20
#FFFFFF10.201.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.201.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5b238b;
/* rgb */ color: rgb(91, 35, 139);
/* oklch */ color: oklch(39.6% 0.163 304.4);
Tailwind
colors: {
  custom: {
    50: '#8e64ae',
    500: '#5b238b',
    950: '#000000',
  },
}
SCSS
$custom: #5b238b;
$custom-light: #8e64ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5b238b",
  "rgb": {
    "r": 91,
    "g": 35,
    "b": 139
  },
  "hsl": {
    "h": 272.308,
    "s": 59.77,
    "l": 34.118
  },
  "oklch": {
    "l": 0.3955,
    "c": 0.16305,
    "h": 304.4
  },
  "luminance": 0.0529
}

Semantic roles & 50–950 ramp

primary
#5B238B
secondary
#81B852
accent
#E3458E
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5B238B

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

Preview Lab → · Contrast checker → · Palette generator →

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