#5B128A#5B128A

#5B128A is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.9% C 0.179 H 306.6°. Best body text is #FFFFFF at 11.06:1 contrast (WCAG AA passes).

Color values

HEX#5B128A
RGBrgb(91, 18, 138)
HSLhsl(277, 77%, 31%)
HSVhsv(277, 87%, 54%)
CMYKcmyk(34.1%, 87%, 0%, 45.9%)
CIE-LABlab(25.23, 51.14, -50.43)
CIE-LCHlch(25.23, 71.83, 315.40°)
OKLaboklab(37.91% 0.1065 -0.1437)
OKLCHoklch(37.91% 0.179 306.6)
XYZxyz(9.1171, 4.4918, 24.4265)
Luminance0.0449 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B128A #418A12
analogous
#1F128A #5B128A #8A127D
triadic
#5B128A #8A5B12 #128A5B
tetradic
#5B128A #8A1F12 #418A12 #127D8A
square
#5B128A #8A1F12 #418A12 #127D8A
split-complementary
#5B128A #7D8A12 #128A1F
monochromatic
#14041E #370B54 #5B128A #7F19C0 #9E32E4

Accessibility & contrast

On white

11.06
#5B128A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#5B128A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B128A
11.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B128A#FFFFFF#000000##FFFFFF
##5B128A1.0011.061.9011.06
#FFFFFF11.061.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8D
Deuteranopia (green-blind)
#003C88
Tritanopia (blue-blind)
#533451
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #5b128a;
/* rgb */ color: rgb(91, 18, 138);
/* oklch */ color: oklch(37.9% 0.179 306.6);
Tailwind
colors: {
  custom: {
    50: '#8f5cad',
    500: '#5b128a',
    950: '#000000',
  },
}
SCSS
$custom: #5b128a;
$custom-light: #8f5cad;
$custom-dark: #000000;
JSON
{
  "hex": "#5b128a",
  "rgb": {
    "r": 91,
    "g": 18,
    "b": 138
  },
  "hsl": {
    "h": 276.5,
    "s": 76.923,
    "l": 30.588
  },
  "oklch": {
    "l": 0.37907,
    "c": 0.17887,
    "h": 306.6
  },
  "luminance": 0.04492
}

Semantic roles & 50–950 ramp

primary
#5B128A
secondary
#6DBF39
accent
#F3347F
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B128A

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

Preview Lab → · Contrast checker → · Palette generator →

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