#5A42CA#5A42CA

#5A42CA is a mid, vivid violet. Relative luminance 0.103; OKLCH L 48.9% C 0.200 H 284.3°. Best body text is #FFFFFF at 6.85:1 contrast (WCAG AA passes).

Color values

HEX#5A42CA
RGBrgb(90, 66, 202)
HSLhsl(251, 56%, 53%)
HSVhsv(251, 67%, 79%)
CMYKcmyk(55.4%, 67.3%, 0%, 20.8%)
CIE-LABlab(38.43, 46.10, -67.31)
CIE-LCHlch(38.43, 81.58, 304.40°)
OKLaboklab(48.91% 0.0494 -0.1936)
OKLCHoklch(48.91% 0.2 284.3)
XYZxyz(16.8221, 10.3334, 56.9738)
Luminance0.1033 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A42CA #B2CA42
analogous
#426ECA #5A42CA #9E42CA
triadic
#5A42CA #CA5A42 #42CA5A
tetradic
#5A42CA #CA426E #B2CA42 #42CA9E
square
#5A42CA #CA426E #B2CA42 #42CA9E
split-complementary
#5A42CA #CA9E42 #6ECA42
monochromatic
#2E2072 #422DA2 #5A42CA #8472D7 #ADA2E5

Accessibility & contrast

On white

6.85
#5A42CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.07
#5A42CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A42CA
6.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A42CA#FFFFFF#000000##FFFFFF
##5A42CA1.006.853.076.85
#FFFFFF6.851.0021.001.00
#0000003.0721.001.0021.00
##FFFFFF6.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECE
Deuteranopia (green-blind)
#0056C7
Tritanopia (blue-blind)
#256580
Achromatopsia (no color)
#5A5A5A

Design tokens & code

CSS
--color: #5a42ca;
/* rgb */ color: rgb(90, 66, 202);
/* oklch */ color: oklch(48.9% 0.200 284.3);
Tailwind
colors: {
  custom: {
    50: '#9378db',
    500: '#5a42ca',
    950: '#000000',
  },
}
SCSS
$custom: #5a42ca;
$custom-light: #9378db;
$custom-dark: #000000;
JSON
{
  "hex": "#5a42ca",
  "rgb": {
    "r": 90,
    "g": 66,
    "b": 202
  },
  "hsl": {
    "h": 250.588,
    "s": 56.198,
    "l": 52.549
  },
  "oklch": {
    "l": 0.48906,
    "c": 0.19975,
    "h": 284.3
  },
  "luminance": 0.10334
}

Semantic roles & 50–950 ramp

primary
#5A42CA
secondary
#C7D196
accent
#DF48C5
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A42CA

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

Preview Lab → · Contrast checker → · Palette generator →

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