#5B125E#5B125E

#5B125E is a dark, vivid purple. Relative luminance 0.035; OKLCH L 34.4% C 0.139 H 326.3°. Best body text is #FFFFFF at 12.40:1 contrast (WCAG AA passes).

Color values

HEX#5B125E
RGBrgb(91, 18, 94)
HSLhsl(298, 68%, 22%)
HSVhsv(298, 81%, 37%)
CMYKcmyk(3.2%, 80.9%, 0%, 63.1%)
CIE-LABlab(21.82, 41.99, -27.69)
CIE-LCHlch(21.82, 50.30, 326.59°)
OKLaboklab(34.44% 0.1155 -0.077)
OKLCHoklch(34.44% 0.139 326.3)
XYZxyz(6.5509, 3.4654, 10.9113)
Luminance0.0347 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B125E #155E12
analogous
#35125E #5B125E #5E123B
triadic
#5B125E #5E5B12 #125E5B
tetradic
#5B125E #5E3512 #155E12 #123B5E
square
#5B125E #5E3512 #155E12 #123B5E
split-complementary
#5B125E #3B5E12 #125E35
monochromatic
#19051A #29082B #5B125E #8D1C91 #BE26C5

Accessibility & contrast

On white

12.40
#5B125E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#5B125E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B125E
12.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B125E#FFFFFF#000000##FFFFFF
##5B125E1.0012.401.6912.40
#FFFFFF12.401.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E60
Deuteranopia (green-blind)
#25375C
Tritanopia (blue-blind)
#5E1F37
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #5b125e;
/* rgb */ color: rgb(91, 18, 94);
/* oklch */ color: oklch(34.4% 0.139 326.3);
Tailwind
colors: {
  custom: {
    50: '#8c5a8c',
    500: '#5b125e',
    950: '#000000',
  },
}
SCSS
$custom: #5b125e;
$custom-light: #8c5a8c;
$custom-dark: #000000;
JSON
{
  "hex": "#5b125e",
  "rgb": {
    "r": 91,
    "g": 18,
    "b": 94
  },
  "hsl": {
    "h": 297.632,
    "s": 67.857,
    "l": 21.961
  },
  "oklch": {
    "l": 0.34438,
    "c": 0.13885,
    "h": 326.3
  },
  "luminance": 0.03465
}

Semantic roles & 50–950 ramp

primary
#5B125E
secondary
#399635
accent
#EB3D44
background
#F8F5F8
surface
#F0E9F0
border
#CBC5CB
text
#0C040C
muted
#7D797D

Preview Lab

Preview with #5B125E

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

Preview Lab → · Contrast checker → · Palette generator →

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