#5A1F9F#5A1F9F

#5A1F9F is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.7% C 0.188 H 298.2°. Best body text is #FFFFFF at 9.85:1 contrast (WCAG AA passes).

Color values

HEX#5A1F9F
RGBrgb(90, 31, 159)
HSLhsl(268, 67%, 37%)
HSVhsv(268, 81%, 62%)
CMYKcmyk(43.4%, 80.5%, 0%, 37.6%)
CIE-LABlab(28.53, 51.45, -57.99)
CIE-LCHlch(28.53, 77.52, 311.58°)
OKLaboklab(40.74% 0.0889 -0.166)
OKLCHoklch(40.74% 0.188 298.2)
XYZxyz(10.9628, 5.6566, 33.3084)
Luminance0.0566 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F9F #649F1F
analogous
#1F249F #5A1F9F #9A1F9F
triadic
#5A1F9F #9F5A1F #1F9F5A
tetradic
#5A1F9F #9F1F24 #649F1F #1F9F9A
square
#5A1F9F #9F1F24 #649F1F #1F9F9A
split-complementary
#5A1F9F #9F9A1F #249F1F
monochromatic
#200B39 #3D156C #5A1F9F #7729D2 #975ADF

Accessibility & contrast

On white

9.85
#5A1F9F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A1F9F
9.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F9F#FFFFFF#000000##FFFFFF
##5A1F9F1.009.852.139.85
#FFFFFF9.851.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0043A2
Deuteranopia (green-blind)
#00429D
Tritanopia (blue-blind)
#48435F
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #5a1f9f;
/* rgb */ color: rgb(90, 31, 159);
/* oklch */ color: oklch(40.7% 0.188 298.2);
Tailwind
colors: {
  custom: {
    50: '#9063bc',
    500: '#5a1f9f',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f9f;
$custom-light: #9063bc;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f9f",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 159
  },
  "hsl": {
    "h": 267.656,
    "s": 67.368,
    "l": 37.255
  },
  "oklch": {
    "l": 0.40741,
    "c": 0.18832,
    "h": 298.2
  },
  "luminance": 0.05657
}

Semantic roles & 50–950 ramp

primary
#5A1F9F
secondary
#91C357
accent
#EA3E9B
background
#F9F6FB
surface
#F2EBF7
border
#CCC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5A1F9F

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

Preview Lab → · Contrast checker → · Palette generator →

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