#5A3198#5A3198

#5A3198 is a dark, vivid violet. Relative luminance 0.066; OKLCH L 42.3% C 0.160 H 297.4°. Best body text is #FFFFFF at 9.02:1 contrast (WCAG AA passes).

Color values

HEX#5A3198
RGBrgb(90, 49, 152)
HSLhsl(264, 51%, 39%)
HSVhsv(264, 68%, 60%)
CMYKcmyk(40.8%, 67.8%, 0%, 40.4%)
CIE-LABlab(30.97, 41.08, -49.74)
CIE-LCHlch(30.97, 64.51, 309.55°)
OKLaboklab(42.28% 0.0734 -0.1419)
OKLCHoklch(42.28% 0.16 297.4)
XYZxyz(10.9808, 6.6371, 30.4022)
Luminance0.0664 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A3198 #6F9831
analogous
#313C98 #5A3198 #8E3198
triadic
#5A3198 #985A31 #31985A
tetradic
#5A3198 #98313C #6F9831 #31988E
square
#5A3198 #98313C #6F9831 #31988E
split-complementary
#5A3198 #988E31 #3C9831
monochromatic
#23133B #3F226A #5A3198 #7644C3 #9872D2

Accessibility & contrast

On white

9.02
#5A3198 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.33
#5A3198 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A3198
9.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A3198#FFFFFF#000000##FFFFFF
##5A31981.009.022.339.02
#FFFFFF9.021.0021.001.00
#0000002.3321.001.0021.00
##FFFFFF9.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00499B
Deuteranopia (green-blind)
#004896
Tritanopia (blue-blind)
#4B4960
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #5a3198;
/* rgb */ color: rgb(90, 49, 152);
/* oklch */ color: oklch(42.3% 0.160 297.4);
Tailwind
colors: {
  custom: {
    50: '#8e6cb7',
    500: '#5a3198',
    950: '#000000',
  },
}
SCSS
$custom: #5a3198;
$custom-light: #8e6cb7;
$custom-dark: #000000;
JSON
{
  "hex": "#5a3198",
  "rgb": {
    "r": 90,
    "g": 49,
    "b": 152
  },
  "hsl": {
    "h": 263.883,
    "s": 51.244,
    "l": 39.412
  },
  "oklch": {
    "l": 0.42282,
    "c": 0.15978,
    "h": 297.4
  },
  "luminance": 0.06637
}

Semantic roles & 50–950 ramp

primary
#5A3198
secondary
#9AB96B
accent
#DB4DA2
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0711
muted
#7E7A80

Preview Lab

Preview with #5A3198

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

Preview Lab → · Contrast checker → · Palette generator →

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