#5A168E#5A168E

#5A168E is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.4% C 0.179 H 304.3°. Best body text is #FFFFFF at 10.82:1 contrast (WCAG AA passes).

Color values

HEX#5A168E
RGBrgb(90, 22, 142)
HSLhsl(274, 73%, 32%)
HSVhsv(274, 85%, 56%)
CMYKcmyk(36.6%, 84.5%, 0%, 44.3%)
CIE-LABlab(25.86, 50.65, -51.90)
CIE-LCHlch(25.86, 72.52, 314.30°)
OKLaboklab(38.42% 0.101 -0.1481)
OKLCHoklch(38.42% 0.179 304.3)
XYZxyz(9.3847, 4.7005, 25.9988)
Luminance0.0470 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A168E #4A8E16
analogous
#1E168E #5A168E #8E1686
triadic
#5A168E #8E5A16 #168E5A
tetradic
#5A168E #8E1E16 #4A8E16 #16868E
square
#5A168E #8E1E16 #4A8E16 #16868E
split-complementary
#5A168E #868E16 #168E1E
monochromatic
#170624 #380E59 #5A168E #7C1EC3 #9A3DE1

Accessibility & contrast

On white

10.82
#5A168E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#5A168E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A168E
10.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A168E#FFFFFF#000000##FFFFFF
##5A168E1.0010.821.9410.82
#FFFFFF10.821.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C91
Deuteranopia (green-blind)
#003D8C
Tritanopia (blue-blind)
#503854
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a168e;
/* rgb */ color: rgb(90, 22, 142);
/* oklch */ color: oklch(38.4% 0.179 304.3);
Tailwind
colors: {
  custom: {
    50: '#8e5eb0',
    500: '#5a168e',
    950: '#000000',
  },
}
SCSS
$custom: #5a168e;
$custom-light: #8e5eb0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a168e",
  "rgb": {
    "r": 90,
    "g": 22,
    "b": 142
  },
  "hsl": {
    "h": 274,
    "s": 73.171,
    "l": 32.157
  },
  "oklch": {
    "l": 0.3842,
    "c": 0.17924,
    "h": 304.3
  },
  "luminance": 0.047
}

Semantic roles & 50–950 ramp

primary
#5A168E
secondary
#77C13F
accent
#F03888
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5A168E

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

Preview Lab → · Contrast checker → · Palette generator →

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