#5B1F9D#5B1F9D

#5B1F9D is a dark, vivid violet. Relative luminance 0.056; OKLCH L 40.7% C 0.186 H 299.2°. Best body text is #FFFFFF at 9.87:1 contrast (WCAG AA passes).

Color values

HEX#5B1F9D
RGBrgb(91, 31, 157)
HSLhsl(269, 67%, 37%)
HSVhsv(269, 80%, 62%)
CMYKcmyk(42%, 80.3%, 0%, 38.4%)
CIE-LABlab(28.48, 51.11, -56.84)
CIE-LCHlch(28.48, 76.44, 311.96°)
OKLaboklab(40.68% 0.0911 -0.1626)
OKLCHoklch(40.68% 0.186 299.2)
XYZxyz(10.8886, 5.6383, 32.4064)
Luminance0.0564 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B1F9D #619D1F
analogous
#1F229D #5B1F9D #9A1F9D
triadic
#5B1F9D #9D5B1F #1F9D5B
tetradic
#5B1F9D #9D1F22 #619D1F #1F9D9A
square
#5B1F9D #9D1F22 #619D1F #1F9D9A
split-complementary
#5B1F9D #9D9A1F #229D1F
monochromatic
#200B37 #3D156A #5B1F9D #7929D0 #9858DE

Accessibility & contrast

On white

9.87
#5B1F9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#5B1F9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B1F9D
9.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B1F9D#FFFFFF#000000##FFFFFF
##5B1F9D1.009.872.139.87
#FFFFFF9.871.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0043A0
Deuteranopia (green-blind)
#00429B
Tritanopia (blue-blind)
#4B425E
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #5b1f9d;
/* rgb */ color: rgb(91, 31, 157);
/* oklch */ color: oklch(40.7% 0.186 299.2);
Tailwind
colors: {
  custom: {
    50: '#9063bb',
    500: '#5b1f9d',
    950: '#000000',
  },
}
SCSS
$custom: #5b1f9d;
$custom-light: #9063bb;
$custom-dark: #000000;
JSON
{
  "hex": "#5b1f9d",
  "rgb": {
    "r": 91,
    "g": 31,
    "b": 157
  },
  "hsl": {
    "h": 268.571,
    "s": 67.021,
    "l": 36.863
  },
  "oklch": {
    "l": 0.40681,
    "c": 0.18638,
    "h": 299.2
  },
  "luminance": 0.05638
}

Semantic roles & 50–950 ramp

primary
#5B1F9D
secondary
#8EC256
accent
#EA3E98
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5B1F9D

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

Preview Lab → · Contrast checker → · Palette generator →

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