#5A1F98#5A1F98

#5A1F98 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 40.1% C 0.181 H 300.2°. Best body text is #FFFFFF at 10.08:1 contrast (WCAG AA passes).

Color values

HEX#5A1F98
RGBrgb(90, 31, 152)
HSLhsl(269, 66%, 36%)
HSVhsv(269, 80%, 60%)
CMYKcmyk(40.8%, 79.6%, 0%, 40.4%)
CIE-LABlab(27.90, 49.71, -54.74)
CIE-LCHlch(27.90, 73.94, 312.24°)
OKLaboklab(40.11% 0.091 -0.1565)
OKLCHoklch(40.11% 0.181 300.2)
XYZxyz(10.3725, 5.4205, 30.1995)
Luminance0.0542 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1F98 #5D981F
analogous
#1F2198 #5A1F98 #961F98
triadic
#5A1F98 #985A1F #1F985A
tetradic
#5A1F98 #981F21 #5D981F #1F9896
square
#5A1F98 #981F21 #5D981F #1F9896
split-complementary
#5A1F98 #98961F #21981F
monochromatic
#1E0A32 #3C1565 #5A1F98 #7829CB #9755DC

Accessibility & contrast

On white

10.08
#5A1F98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#5A1F98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1F98
10.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1F98#FFFFFF#000000##FFFFFF
##5A1F981.0010.082.0810.08
#FFFFFF10.081.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419B
Deuteranopia (green-blind)
#004196
Tritanopia (blue-blind)
#4B405B
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #5a1f98;
/* rgb */ color: rgb(90, 31, 152);
/* oklch */ color: oklch(40.1% 0.181 300.2);
Tailwind
colors: {
  custom: {
    50: '#8f62b7',
    500: '#5a1f98',
    950: '#000000',
  },
}
SCSS
$custom: #5a1f98;
$custom-light: #8f62b7;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1f98",
  "rgb": {
    "r": 90,
    "g": 31,
    "b": 152
  },
  "hsl": {
    "h": 269.256,
    "s": 66.12,
    "l": 35.882
  },
  "oklch": {
    "l": 0.4011,
    "c": 0.18103,
    "h": 300.2
  },
  "luminance": 0.05421
}

Semantic roles & 50–950 ramp

primary
#5A1F98
secondary
#8BC053
accent
#E93F96
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #5A1F98

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

Preview Lab → · Contrast checker → · Palette generator →

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