#5A168B#5A168B

#5A168B is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.2% C 0.176 H 305.3°. Best body text is #FFFFFF at 10.92:1 contrast (WCAG AA passes).

Color values

HEX#5A168B
RGBrgb(90, 22, 139)
HSLhsl(275, 73%, 32%)
HSVhsv(275, 84%, 55%)
CMYKcmyk(35.3%, 84.2%, 0%, 45.5%)
CIE-LABlab(25.60, 49.96, -50.47)
CIE-LCHlch(25.60, 71.01, 314.71°)
OKLaboklab(38.15% 0.102 -0.1439)
OKLCHoklch(38.15% 0.176 305.3)
XYZxyz(9.1625, 4.6116, 24.8285)
Luminance0.0461 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A168B #478B16
analogous
#20168B #5A168B #8B1682
triadic
#5A168B #8B5A16 #168B5A
tetradic
#5A168B #8B2016 #478B16 #16828B
square
#5A168B #8B2016 #478B16 #16828B
split-complementary
#5A168B #828B16 #168B20
monochromatic
#160521 #380E56 #5A168B #7C1EC0 #9B3BE0

Accessibility & contrast

On white

10.92
#5A168B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#5A168B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A168B
10.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A168B#FFFFFF#000000##FFFFFF
##5A168B1.0010.921.9210.92
#FFFFFF10.921.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8E
Deuteranopia (green-blind)
#003D89
Tritanopia (blue-blind)
#513752
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a168b;
/* rgb */ color: rgb(90, 22, 139);
/* oklch */ color: oklch(38.2% 0.176 305.3);
Tailwind
colors: {
  custom: {
    50: '#8e5eae',
    500: '#5a168b',
    950: '#000000',
  },
}
SCSS
$custom: #5a168b;
$custom-light: #8e5eae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a168b",
  "rgb": {
    "r": 90,
    "g": 22,
    "b": 139
  },
  "hsl": {
    "h": 274.872,
    "s": 72.671,
    "l": 31.569
  },
  "oklch": {
    "l": 0.38154,
    "c": 0.17633,
    "h": 305.3
  },
  "luminance": 0.04612
}

Semantic roles & 50–950 ramp

primary
#5A168B
secondary
#74BF3E
accent
#EF3885
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A168B

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

Preview Lab → · Contrast checker → · Palette generator →

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