#5B128E#5B128E

#5B128E is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.3% C 0.183 H 305.2°. Best body text is #FFFFFF at 10.93:1 contrast (WCAG AA passes).

Color values

HEX#5B128E
RGBrgb(91, 18, 142)
HSLhsl(275, 78%, 31%)
HSVhsv(275, 87%, 56%)
CMYKcmyk(35.9%, 87.3%, 0%, 44.3%)
CIE-LABlab(25.59, 52.04, -52.34)
CIE-LCHlch(25.59, 73.81, 314.84°)
OKLaboklab(38.26% 0.1052 -0.1493)
OKLCHoklch(38.26% 0.183 305.2)
XYZxyz(9.4121, 4.6098, 25.9799)
Luminance0.0461 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B128E #458E12
analogous
#1D128E #5B128E #8E1283
triadic
#5B128E #8E5B12 #128E5B
tetradic
#5B128E #8E1D12 #458E12 #12838E
square
#5B128E #8E1D12 #458E12 #12838E
split-complementary
#5B128E #838E12 #128E1D
monochromatic
#150421 #380B58 #5B128E #7E19C4 #9D35E5

Accessibility & contrast

On white

10.93
#5B128E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#5B128E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B128E
10.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B128E#FFFFFF#000000##FFFFFF
##5B128E1.0010.931.9210.93
#FFFFFF10.931.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B91
Deuteranopia (green-blind)
#003D8C
Tritanopia (blue-blind)
#513653
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5b128e;
/* rgb */ color: rgb(91, 18, 142);
/* oklch */ color: oklch(38.3% 0.183 305.2);
Tailwind
colors: {
  custom: {
    50: '#8f5cb0',
    500: '#5b128e',
    950: '#000000',
  },
}
SCSS
$custom: #5b128e;
$custom-light: #8f5cb0;
$custom-dark: #000000;
JSON
{
  "hex": "#5b128e",
  "rgb": {
    "r": 91,
    "g": 18,
    "b": 142
  },
  "hsl": {
    "h": 275.323,
    "s": 77.5,
    "l": 31.373
  },
  "oklch": {
    "l": 0.38264,
    "c": 0.18261,
    "h": 305.2
  },
  "luminance": 0.0461
}

Semantic roles & 50–950 ramp

primary
#5B128E
secondary
#72C23A
accent
#F43483
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5B128E

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

Preview Lab → · Contrast checker → · Palette generator →

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