#5A1F9E#5A1F9E

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

Color values

HEX#5A1F9E
RGBrgb(90, 31, 158)
HSLhsl(268, 67%, 37%)
HSVhsv(268, 80%, 62%)
CMYKcmyk(43%, 80.4%, 0%, 38%)
CIE-LABlab(28.44, 51.20, -57.53)
CIE-LCHlch(28.44, 77.01, 311.67°)
OKLaboklab(40.65% 0.0892 -0.1647)
OKLCHoklch(40.65% 0.187 298.5)
XYZxyz(10.8764, 5.6221, 32.8533)
Luminance0.0562 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F9E #639E1F
analogous
#1F239E #5A1F9E #9A1F9E
triadic
#5A1F9E #9E5A1F #1F9E5A
tetradic
#5A1F9E #9E1F23 #639E1F #1F9E9A
square
#5A1F9E #9E1F23 #639E1F #1F9E9A
split-complementary
#5A1F9E #9E9A1F #239E1F
monochromatic
#200B38 #3D156B #5A1F9E #7729D1 #9759DE

Accessibility & contrast

On white

9.89
#5A1F9E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A1F9E
9.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F9E#FFFFFF#000000##FFFFFF
##5A1F9E1.009.892.129.89
#FFFFFF9.891.0021.001.00
#0000002.1221.001.0021.00
##FFFFFF9.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0043A1
Deuteranopia (green-blind)
#00429C
Tritanopia (blue-blind)
#49425F
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #5a1f9e;
/* rgb */ color: rgb(90, 31, 158);
/* oklch */ color: oklch(40.6% 0.187 298.5);
Tailwind
colors: {
  custom: {
    50: '#9062bc',
    500: '#5a1f9e',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f9e;
$custom-light: #9062bc;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f9e",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 158
  },
  "hsl": {
    "h": 267.874,
    "s": 67.196,
    "l": 37.059
  },
  "oklch": {
    "l": 0.4065,
    "c": 0.18728,
    "h": 298.5
  },
  "luminance": 0.05622
}

Semantic roles & 50–950 ramp

primary
#5A1F9E
secondary
#90C256
accent
#EA3E9A
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5A1F9E

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

Preview Lab → · Contrast checker → · Palette generator →

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