#5B238C#5B238C

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

Color values

HEX#5B238C
RGBrgb(91, 35, 140)
HSLhsl(272, 60%, 34%)
HSVhsv(272, 75%, 55%)
CMYKcmyk(35%, 75%, 0%, 45.1%)
CIE-LABlab(27.63, 45.19, -47.78)
CIE-LCHlch(27.63, 65.77, 313.41°)
OKLaboklab(39.63% 0.0919 -0.136)
OKLCHoklch(39.63% 0.164 304)
XYZxyz(9.6480, 5.3197, 25.3244)
Luminance0.0532 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B238C #548C23
analogous
#27238C #5B238C #8C2389
triadic
#5B238C #8C5B23 #238C5B
tetradic
#5B238C #8C2723 #548C23 #23898C
square
#5B238C #8C2723 #548C23 #23898C
split-complementary
#5B238C #898C23 #238C27
monochromatic
#1B0B2A #3B175B #5B238C #7B2FBD #9955D4

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##5B238C#FFFFFF#000000##FFFFFF
##5B238C1.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)
#00408F
Deuteranopia (green-blind)
#00418A
Tritanopia (blue-blind)
#513D55
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5b238c;
/* rgb */ color: rgb(91, 35, 140);
/* oklch */ color: oklch(39.6% 0.164 304.0);
Tailwind
colors: {
  custom: {
    50: '#8e64ae',
    500: '#5b238c',
    950: '#000000',
  },
}
SCSS
$custom: #5b238c;
$custom-light: #8e64ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5b238c",
  "rgb": {
    "r": 91,
    "g": 35,
    "b": 140
  },
  "hsl": {
    "h": 272,
    "s": 60,
    "l": 34.314
  },
  "oklch": {
    "l": 0.39632,
    "c": 0.16413,
    "h": 304
  },
  "luminance": 0.0532
}

Semantic roles & 50–950 ramp

primary
#5B238C
secondary
#82B852
accent
#E3458F
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5B238C

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

Preview Lab → · Contrast checker → · Palette generator →

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