#5A1F8B#5A1F8B

#5A1F8B is a dark, vivid violet. Relative luminance 0.050; OKLCH L 39.0% C 0.167 H 304.3°. Best body text is #FFFFFF at 10.48:1 contrast (WCAG AA passes).

Color values

HEX#5A1F8B
RGBrgb(90, 31, 139)
HSLhsl(273, 64%, 33%)
HSVhsv(273, 78%, 55%)
CMYKcmyk(35.3%, 77.7%, 0%, 45.5%)
CIE-LABlab(26.79, 46.52, -48.53)
CIE-LCHlch(26.79, 67.23, 313.79°)
OKLaboklab(38.98% 0.0945 -0.1383)
OKLCHoklch(38.98% 0.167 304.3)
XYZxyz(9.3656, 5.0177, 24.8962)
Luminance0.0502 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F8B #508B1F
analogous
#241F8B #5A1F8B #8B1F86
triadic
#5A1F8B #8B5A1F #1F8B5A
tetradic
#5A1F8B #8B241F #508B1F #1F868B
square
#5A1F8B #8B241F #508B1F #1F868B
split-complementary
#5A1F8B #868B1F #1F8B24
monochromatic
#190927 #3A1459 #5A1F8B #7A2ABD #994DD7

Accessibility & contrast

On white

10.48
#5A1F8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#5A1F8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1F8B
10.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F8B#FFFFFF#000000##FFFFFF
##5A1F8B1.0010.482.0010.48
#FFFFFF10.481.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8E
Deuteranopia (green-blind)
#003F89
Tritanopia (blue-blind)
#503A54
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5a1f8b;
/* rgb */ color: rgb(90, 31, 139);
/* oklch */ color: oklch(39.0% 0.167 304.3);
Tailwind
colors: {
  custom: {
    50: '#8e61ae',
    500: '#5a1f8b',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f8b;
$custom-light: #8e61ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f8b",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 139
  },
  "hsl": {
    "h": 272.778,
    "s": 63.529,
    "l": 33.333
  },
  "oklch": {
    "l": 0.38983,
    "c": 0.16744,
    "h": 304.3
  },
  "luminance": 0.05018
}

Semantic roles & 50–950 ramp

primary
#5A1F8B
secondary
#7EBA4C
accent
#E7418C
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0510
muted
#7E7A7F

Preview Lab

Preview with #5A1F8B

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

Preview Lab → · Contrast checker → · Palette generator →

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