#5B127D#5B127D

#5B127D is a dark, vivid purple. Relative luminance 0.041; OKLCH L 36.8% C 0.167 H 311.5°. Best body text is #FFFFFF at 11.49:1 contrast (WCAG AA passes).

Color values

HEX#5B127D
RGBrgb(91, 18, 125)
HSLhsl(281, 75%, 28%)
HSVhsv(281, 86%, 49%)
CMYKcmyk(27.2%, 85.6%, 0%, 51%)
CIE-LABlab(24.12, 48.28, -44.06)
CIE-LCHlch(24.12, 65.37, 317.61°)
OKLaboklab(36.79% 0.1104 -0.125)
OKLCHoklch(36.79% 0.167 311.5)
XYZxyz(8.2317, 4.1376, 19.7631)
Luminance0.0414 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B127D #347D12
analogous
#26127D #5B127D #7D1269
triadic
#5B127D #7D5B12 #127D5B
tetradic
#5B127D #7D2612 #347D12 #12697D
square
#5B127D #7D2612 #347D12 #12697D
split-complementary
#5B127D #697D12 #127D26
monochromatic
#13041B #340A48 #5B127D #821AB2 #A629E0

Accessibility & contrast

On white

11.49
#5B127D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B127D
11.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B127D#FFFFFF#000000##FFFFFF
##5B127D1.0011.491.8311.49
#FFFFFF11.491.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003680
Deuteranopia (green-blind)
#003B7B
Tritanopia (blue-blind)
#572E49
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #5b127d;
/* rgb */ color: rgb(91, 18, 125);
/* oklch */ color: oklch(36.8% 0.167 311.5);
Tailwind
colors: {
  custom: {
    50: '#8e5ba3',
    500: '#5b127d',
    950: '#000000',
  },
}
SCSS
$custom: #5b127d;
$custom-light: #8e5ba3;
$custom-dark: #000000;
JSON
{
  "hex": "#5b127d",
  "rgb": {
    "r": 91,
    "g": 18,
    "b": 125
  },
  "hsl": {
    "h": 280.935,
    "s": 74.825,
    "l": 28.039
  },
  "oklch": {
    "l": 0.36788,
    "c": 0.16677,
    "h": 311.5
  },
  "luminance": 0.04137
}

Semantic roles & 50–950 ramp

primary
#5B127D
secondary
#5FB338
accent
#F13672
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5B127D

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

Preview Lab → · Contrast checker → · Palette generator →

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