#5A1F95#5A1F95

#5A1F95 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.8% C 0.178 H 301.1°. Best body text is #FFFFFF at 10.17:1 contrast (WCAG AA passes).

Color values

HEX#5A1F95
RGBrgb(90, 31, 149)
HSLhsl(270, 66%, 35%)
HSVhsv(270, 79%, 58%)
CMYKcmyk(39.6%, 79.2%, 0%, 41.6%)
CIE-LABlab(27.64, 48.97, -53.33)
CIE-LCHlch(27.64, 72.40, 312.56°)
OKLaboklab(39.84% 0.0919 -0.1523)
OKLCHoklch(39.84% 0.178 301.1)
XYZxyz(10.1299, 5.3235, 28.9218)
Luminance0.0532 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F95 #5A951F
analogous
#1F1F95 #5A1F95 #951F95
triadic
#5A1F95 #955A1F #1F955A
tetradic
#5A1F95 #951F1F #5A951F #1F9595
square
#5A1F95 #951F1F #5A951F #1F9595
split-complementary
#5A1F95 #95951F #1F951F
monochromatic
#1D0A30 #3B1462 #5A1F95 #792AC8 #9753DB

Accessibility & contrast

On white

10.17
#5A1F95 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#5A1F95 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1F95
10.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F95#FFFFFF#000000##FFFFFF
##5A1F951.0010.172.0610.17
#FFFFFF10.171.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004198
Deuteranopia (green-blind)
#004193
Tritanopia (blue-blind)
#4D3F5A
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a1f95;
/* rgb */ color: rgb(90, 31, 149);
/* oklch */ color: oklch(39.8% 0.178 301.1);
Tailwind
colors: {
  custom: {
    50: '#8f62b5',
    500: '#5a1f95',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f95;
$custom-light: #8f62b5;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f95",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 149
  },
  "hsl": {
    "h": 270,
    "s": 65.556,
    "l": 35.294
  },
  "oklch": {
    "l": 0.39844,
    "c": 0.1779,
    "h": 301.1
  },
  "luminance": 0.05324
}

Semantic roles & 50–950 ramp

primary
#5A1F95
secondary
#88BF51
accent
#E93F94
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #5A1F95

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

Preview Lab → · Contrast checker → · Palette generator →

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