#5B1F8D#5B1F8D

#5B1F8D is a dark, vivid violet. Relative luminance 0.051; OKLCH L 39.3% C 0.170 H 304.2°. Best body text is #FFFFFF at 10.37:1 contrast (WCAG AA passes).

Color values

HEX#5B1F8D
RGBrgb(91, 31, 141)
HSLhsl(273, 64%, 34%)
HSVhsv(273, 78%, 55%)
CMYKcmyk(35.5%, 78%, 0%, 44.7%)
CIE-LABlab(27.09, 47.19, -49.26)
CIE-LCHlch(27.09, 68.22, 313.77°)
OKLaboklab(39.28% 0.0955 -0.1404)
OKLCHoklch(39.28% 0.17 304.2)
XYZxyz(9.6110, 5.1272, 25.6775)
Luminance0.0513 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B1F8D #518D1F
analogous
#241F8D #5B1F8D #8D1F88
triadic
#5B1F8D #8D5B1F #1F8D5B
tetradic
#5B1F8D #8D241F #518D1F #1F888D
square
#5B1F8D #8D241F #518D1F #1F888D
split-complementary
#5B1F8D #888D1F #1F8D24
monochromatic
#1A0929 #3B145B #5B1F8D #7B2ABF #994ED8

Accessibility & contrast

On white

10.37
#5B1F8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#5B1F8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B1F8D
10.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B1F8D#FFFFFF#000000##FFFFFF
##5B1F8D1.0010.372.0310.37
#FFFFFF10.371.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F90
Deuteranopia (green-blind)
#00408B
Tritanopia (blue-blind)
#513B55
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #5b1f8d;
/* rgb */ color: rgb(91, 31, 141);
/* oklch */ color: oklch(39.3% 0.170 304.2);
Tailwind
colors: {
  custom: {
    50: '#8f62af',
    500: '#5b1f8d',
    950: '#000000',
  },
}
SCSS
$custom: #5b1f8d;
$custom-light: #8f62af;
$custom-dark: #000000;
JSON
{
  "hex": "#5b1f8d",
  "rgb": {
    "r": 91,
    "g": 31,
    "b": 141
  },
  "hsl": {
    "h": 272.727,
    "s": 63.953,
    "l": 33.725
  },
  "oklch": {
    "l": 0.39282,
    "c": 0.16975,
    "h": 304.2
  },
  "luminance": 0.05127
}

Semantic roles & 50–950 ramp

primary
#5B1F8D
secondary
#7FBB4D
accent
#E7418C
background
#F9F6FA
surface
#F1EBF5
border
#CBC6CF
text
#0D0510
muted
#7E7A7F

Preview Lab

Preview with #5B1F8D

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

Preview Lab → · Contrast checker → · Palette generator →

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