#5A2EC4#5A2EC4

#5A2EC4 is a mid, highly saturated violet. Relative luminance 0.081; OKLCH L 45.8% C 0.214 H 288.1°. Best body text is #FFFFFF at 8.01:1 contrast (WCAG AA passes).

Color values

HEX#5A2EC4
RGBrgb(90, 46, 196)
HSLhsl(258, 62%, 47%)
HSVhsv(258, 77%, 77%)
CMYKcmyk(54.1%, 76.5%, 0%, 23.1%)
CIE-LABlab(34.22, 54.68, -70.73)
CIE-LCHlch(34.22, 89.40, 307.71°)
OKLaboklab(45.75% 0.0667 -0.2035)
OKLCHoklch(45.75% 0.214 288.1)
XYZxyz(15.1543, 8.1124, 52.9812)
Luminance0.0811 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2EC4 #98C42E
analogous
#2E4DC4 #5A2EC4 #A52EC4
triadic
#5A2EC4 #C45A2E #2EC45A
tetradic
#5A2EC4 #C42E4D #98C42E #2EC4A5
square
#5A2EC4 #C42E4D #98C42E #2EC4A5
split-complementary
#5A2EC4 #C4A52E #4DC42E
monochromatic
#2C1761 #432292 #5A2EC4 #7D58D8 #A489E3

Accessibility & contrast

On white

8.01
#5A2EC4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.62
#5A2EC4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2EC4
8.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2EC4#FFFFFF#000000##FFFFFF
##5A2EC41.008.012.628.01
#FFFFFF8.011.0021.001.00
#0000002.6221.001.0021.00
##FFFFFF8.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054C8
Deuteranopia (green-blind)
#004CC1
Tritanopia (blue-blind)
#2E5978
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #5a2ec4;
/* rgb */ color: rgb(90, 46, 196);
/* oklch */ color: oklch(45.8% 0.214 288.1);
Tailwind
colors: {
  custom: {
    50: '#946cd7',
    500: '#5a2ec4',
    950: '#000000',
  },
}
SCSS
$custom: #5a2ec4;
$custom-light: #946cd7;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2ec4",
  "rgb": {
    "r": 90,
    "g": 46,
    "b": 196
  },
  "hsl": {
    "h": 257.6,
    "s": 61.983,
    "l": 47.451
  },
  "oklch": {
    "l": 0.4575,
    "c": 0.21412,
    "h": 288.1
  },
  "luminance": 0.08113
}

Semantic roles & 50–950 ramp

primary
#5A2EC4
secondary
#B7CD81
accent
#E543B5
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0E0715
muted
#7E7A83

Preview Lab

Preview with #5A2EC4

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

Preview Lab → · Contrast checker → · Palette generator →

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