#5A1F9D#5A1F9D

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

Color values

HEX#5A1F9D
RGBrgb(90, 31, 157)
HSLhsl(268, 67%, 37%)
HSVhsv(268, 80%, 62%)
CMYKcmyk(42.7%, 80.3%, 0%, 38.4%)
CIE-LABlab(28.35, 50.95, -57.06)
CIE-LCHlch(28.35, 76.50, 311.76°)
OKLaboklab(40.56% 0.0895 -0.1633)
OKLCHoklch(40.56% 0.186 298.7)
XYZxyz(10.7907, 5.5878, 32.4018)
Luminance0.0559 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F9D #629D1F
analogous
#1F239D #5A1F9D #991F9D
triadic
#5A1F9D #9D5A1F #1F9D5A
tetradic
#5A1F9D #9D1F23 #629D1F #1F9D99
square
#5A1F9D #9D1F23 #629D1F #1F9D99
split-complementary
#5A1F9D #9D991F #239D1F
monochromatic
#1F0B37 #3D156A #5A1F9D #7729D0 #9758DE

Accessibility & contrast

On white

9.92
#5A1F9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.12
#5A1F9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1F9D
9.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F9D#FFFFFF#000000##FFFFFF
##5A1F9D1.009.922.129.92
#FFFFFF9.921.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.921.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5a1f9d;
/* rgb */ color: rgb(90, 31, 157);
/* oklch */ color: oklch(40.6% 0.186 298.7);
Tailwind
colors: {
  custom: {
    50: '#9062bb',
    500: '#5a1f9d',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f9d;
$custom-light: #9062bb;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f9d",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 157
  },
  "hsl": {
    "h": 268.095,
    "s": 67.021,
    "l": 36.863
  },
  "oklch": {
    "l": 0.40559,
    "c": 0.18625,
    "h": 298.7
  },
  "luminance": 0.05588
}

Semantic roles & 50–950 ramp

primary
#5A1F9D
secondary
#8FC256
accent
#EA3E99
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5A1F9D

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

Preview Lab → · Contrast checker → · Palette generator →

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