#5B1F98#5B1F98

#5B1F98 is a dark, vivid violet. Relative luminance 0.055; OKLCH L 40.2% C 0.181 H 300.7°. Best body text is #FFFFFF at 10.03:1 contrast (WCAG AA passes).

Color values

HEX#5B1F98
RGBrgb(91, 31, 152)
HSLhsl(270, 66%, 36%)
HSVhsv(270, 80%, 60%)
CMYKcmyk(40.1%, 79.6%, 0%, 40.4%)
CIE-LABlab(28.04, 49.88, -54.51)
CIE-LCHlch(28.04, 73.89, 312.46°)
OKLaboklab(40.23% 0.0925 -0.1558)
OKLCHoklch(40.23% 0.181 300.7)
XYZxyz(10.4705, 5.4710, 30.2041)
Luminance0.0547 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B1F98 #5C981F
analogous
#1F2098 #5B1F98 #971F98
triadic
#5B1F98 #985B1F #1F985B
tetradic
#5B1F98 #981F20 #5C981F #1F9897
square
#5B1F98 #981F20 #5C981F #1F9897
split-complementary
#5B1F98 #98971F #20981F
monochromatic
#1E0A32 #3D1565 #5B1F98 #7929CB #9855DC

Accessibility & contrast

On white

10.03
#5B1F98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#5B1F98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B1F98
10.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B1F98#FFFFFF#000000##FFFFFF
##5B1F981.0010.032.0910.03
#FFFFFF10.031.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00429B
Deuteranopia (green-blind)
#004196
Tritanopia (blue-blind)
#4D405B
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #5b1f98;
/* rgb */ color: rgb(91, 31, 152);
/* oklch */ color: oklch(40.2% 0.181 300.7);
Tailwind
colors: {
  custom: {
    50: '#9062b7',
    500: '#5b1f98',
    950: '#000000',
  },
}
SCSS
$custom: #5b1f98;
$custom-light: #9062b7;
$custom-dark: #000000;
JSON
{
  "hex": "#5b1f98",
  "rgb": {
    "r": 91,
    "g": 31,
    "b": 152
  },
  "hsl": {
    "h": 269.752,
    "s": 66.12,
    "l": 35.882
  },
  "oklch": {
    "l": 0.40234,
    "c": 0.18119,
    "h": 300.7
  },
  "luminance": 0.05471
}

Semantic roles & 50–950 ramp

primary
#5B1F98
secondary
#8AC053
accent
#E93F95
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #5B1F98

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

Preview Lab → · Contrast checker → · Palette generator →

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