#5A42CC#5A42CC

#5A42CC is a mid, highly saturated violet. Relative luminance 0.104; OKLCH L 49.1% C 0.202 H 284.0°. Best body text is #FFFFFF at 6.80:1 contrast (WCAG AA passes).

Color values

HEX#5A42CC
RGBrgb(90, 66, 204)
HSLhsl(250, 58%, 53%)
HSVhsv(250, 68%, 80%)
CMYKcmyk(55.9%, 67.6%, 0%, 20%)
CIE-LABlab(38.60, 46.70, -68.20)
CIE-LCHlch(38.60, 82.65, 304.40°)
OKLaboklab(49.08% 0.0491 -0.1962)
OKLCHoklch(49.08% 0.202 284)
XYZxyz(17.0604, 10.4287, 58.2290)
Luminance0.1043 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A42CC #B4CC42
analogous
#426FCC #5A42CC #9F42CC
triadic
#5A42CC #CC5A42 #42CC5A
tetradic
#5A42CC #CC426F #B4CC42 #42CC9F
square
#5A42CC #CC426F #B4CC42 #42CC9F
split-complementary
#5A42CC #CC9F42 #6FCC42
monochromatic
#2E1F74 #412CA4 #5A42CC #8472D9 #AEA2E6

Accessibility & contrast

On white

6.80
#5A42CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.09
#5A42CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A42CC
6.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A42CC#FFFFFF#000000##FFFFFF
##5A42CC1.006.803.096.80
#FFFFFF6.801.0021.001.00
#0000003.0921.001.0021.00
##FFFFFF6.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FD0
Deuteranopia (green-blind)
#0056C9
Tritanopia (blue-blind)
#226682
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5a42cc;
/* rgb */ color: rgb(90, 66, 204);
/* oklch */ color: oklch(49.1% 0.202 284.0);
Tailwind
colors: {
  custom: {
    50: '#9478dd',
    500: '#5a42cc',
    950: '#000000',
  },
}
SCSS
$custom: #5a42cc;
$custom-light: #9478dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5a42cc",
  "rgb": {
    "r": 90,
    "g": 66,
    "b": 204
  },
  "hsl": {
    "h": 250.435,
    "s": 57.5,
    "l": 52.941
  },
  "oklch": {
    "l": 0.49078,
    "c": 0.2022,
    "h": 284
  },
  "luminance": 0.1043
}

Semantic roles & 50–950 ramp

primary
#5A42CC
secondary
#C8D397
accent
#E147C6
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A42CC

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

Preview Lab → · Contrast checker → · Palette generator →

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