#5A168D#5A168D

#5A168D is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.3% C 0.178 H 304.6°. Best body text is #FFFFFF at 10.86:1 contrast (WCAG AA passes).

Color values

HEX#5A168D
RGBrgb(90, 22, 141)
HSLhsl(274, 73%, 32%)
HSVhsv(274, 84%, 55%)
CMYKcmyk(36.2%, 84.4%, 0%, 44.7%)
CIE-LABlab(25.77, 50.42, -51.42)
CIE-LCHlch(25.77, 72.02, 314.44°)
OKLaboklab(38.33% 0.1013 -0.1467)
OKLCHoklch(38.33% 0.178 304.6)
XYZxyz(9.3100, 4.6706, 25.6052)
Luminance0.0467 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A168D #498D16
analogous
#1F168D #5A168D #8D1685
triadic
#5A168D #8D5A16 #168D5A
tetradic
#5A168D #8D1F16 #498D16 #16858D
square
#5A168D #8D1F16 #498D16 #16858D
split-complementary
#5A168D #858D16 #168D1F
monochromatic
#160523 #380E58 #5A168D #7C1EC2 #9A3DE1

Accessibility & contrast

On white

10.86
#5A168D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#5A168D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A168D
10.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A168D#FFFFFF#000000##FFFFFF
##5A168D1.0010.861.9310.86
#FFFFFF10.861.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B90
Deuteranopia (green-blind)
#003D8B
Tritanopia (blue-blind)
#503753
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a168d;
/* rgb */ color: rgb(90, 22, 141);
/* oklch */ color: oklch(38.3% 0.178 304.6);
Tailwind
colors: {
  custom: {
    50: '#8e5eaf',
    500: '#5a168d',
    950: '#000000',
  },
}
SCSS
$custom: #5a168d;
$custom-light: #8e5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#5a168d",
  "rgb": {
    "r": 90,
    "g": 22,
    "b": 141
  },
  "hsl": {
    "h": 274.286,
    "s": 73.006,
    "l": 31.961
  },
  "oklch": {
    "l": 0.38331,
    "c": 0.17827,
    "h": 304.6
  },
  "luminance": 0.04671
}

Semantic roles & 50–950 ramp

primary
#5A168D
secondary
#76C13E
accent
#F03887
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A168D

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

Preview Lab → · Contrast checker → · Palette generator →

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