#5A42B2#5A42B2

#5A42B2 is a mid, vivid violet. Relative luminance 0.093; OKLCH L 46.9% C 0.170 H 287.9°. Best body text is #FFFFFF at 7.35:1 contrast (WCAG AA passes).

Color values

HEX#5A42B2
RGBrgb(90, 66, 178)
HSLhsl(253, 46%, 48%)
HSVhsv(253, 63%, 70%)
CMYKcmyk(49.4%, 62.9%, 0%, 30.2%)
CIE-LABlab(36.53, 38.90, -56.35)
CIE-LCHlch(36.53, 68.47, 304.62°)
OKLaboklab(46.93% 0.0521 -0.1613)
OKLCHoklch(46.93% 0.17 287.9)
XYZxyz(14.1982, 9.2838, 43.1547)
Luminance0.0928 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A42B2 #9AB242
analogous
#4262B2 #5A42B2 #9242B2
triadic
#5A42B2 #B25A42 #42B25A
tetradic
#5A42B2 #B24262 #9AB242 #42B292
square
#5A42B2 #B24262 #9AB242 #42B292
split-complementary
#5A42B2 #B29242 #62B242
monochromatic
#2D2159 #433185 #5A42B2 #7E6AC8 #A496D8

Accessibility & contrast

On white

7.35
#5A42B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.86
#5A42B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A42B2
7.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A42B2#FFFFFF#000000##FFFFFF
##5A42B21.007.352.867.35
#FFFFFF7.351.0021.001.00
#0000002.8621.001.0021.00
##FFFFFF7.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0058B6
Deuteranopia (green-blind)
#0053B0
Tritanopia (blue-blind)
#3C5D74
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #5a42b2;
/* rgb */ color: rgb(90, 66, 178);
/* oklch */ color: oklch(46.9% 0.170 287.9);
Tailwind
colors: {
  custom: {
    50: '#9078ca',
    500: '#5a42b2',
    950: '#000000',
  },
}
SCSS
$custom: #5a42b2;
$custom-light: #9078ca;
$custom-dark: #000000;
JSON
{
  "hex": "#5a42b2",
  "rgb": {
    "r": 90,
    "g": 66,
    "b": 178
  },
  "hsl": {
    "h": 252.857,
    "s": 45.902,
    "l": 47.843
  },
  "oklch": {
    "l": 0.46929,
    "c": 0.16955,
    "h": 287.9
  },
  "luminance": 0.09284
}

Semantic roles & 50–950 ramp

primary
#5A42B2
secondary
#B8C48C
accent
#D652B9
background
#F9F7FC
surface
#F2EDF8
border
#CCC8D1
text
#0D0913
muted
#7E7B82

Preview Lab

Preview with #5A42B2

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

Preview Lab → · Contrast checker → · Palette generator →

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