#5B127E#5B127E

#5B127E is a dark, vivid purple. Relative luminance 0.042; OKLCH L 36.9% C 0.168 H 311.1°. Best body text is #FFFFFF at 11.46:1 contrast (WCAG AA passes).

Color values

HEX#5B127E
RGBrgb(91, 18, 126)
HSLhsl(281, 75%, 28%)
HSVhsv(281, 86%, 49%)
CMYKcmyk(27.8%, 85.7%, 0%, 50.6%)
CIE-LABlab(24.20, 48.50, -44.56)
CIE-LCHlch(24.20, 65.86, 317.42°)
OKLaboklab(36.87% 0.1101 -0.1264)
OKLCHoklch(36.87% 0.168 311.1)
XYZxyz(8.2959, 4.1633, 20.1012)
Luminance0.0416 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B127E #357E12
analogous
#25127E #5B127E #7E126B
triadic
#5B127E #7E5B12 #127E5B
tetradic
#5B127E #7E2512 #357E12 #126B7E
square
#5B127E #7E2512 #357E12 #126B7E
split-complementary
#5B127E #6B7E12 #127E25
monochromatic
#13041B #340A48 #5B127E #821AB4 #A52AE1

Accessibility & contrast

On white

11.46
#5B127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#5B127E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B127E
11.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B127E#FFFFFF#000000##FFFFFF
##5B127E1.0011.461.8311.46
#FFFFFF11.461.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003681
Deuteranopia (green-blind)
#003B7C
Tritanopia (blue-blind)
#562F4A
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5b127e;
/* rgb */ color: rgb(91, 18, 126);
/* oklch */ color: oklch(36.9% 0.168 311.1);
Tailwind
colors: {
  custom: {
    50: '#8e5ba4',
    500: '#5b127e',
    950: '#000000',
  },
}
SCSS
$custom: #5b127e;
$custom-light: #8e5ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#5b127e",
  "rgb": {
    "r": 91,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 280.556,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.36872,
    "c": 0.16769,
    "h": 311.1
  },
  "luminance": 0.04163
}

Semantic roles & 50–950 ramp

primary
#5B127E
secondary
#60B438
accent
#F23673
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5B127E

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

Preview Lab → · Contrast checker → · Palette generator →

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