#5A42CB#5A42CB

#5A42CB is a mid, highly saturated violet. Relative luminance 0.104; OKLCH L 49.0% C 0.201 H 284.2°. Best body text is #FFFFFF at 6.83:1 contrast (WCAG AA passes).

Color values

HEX#5A42CB
RGBrgb(90, 66, 203)
HSLhsl(251, 57%, 53%)
HSVhsv(251, 67%, 80%)
CMYKcmyk(55.7%, 67.5%, 0%, 20.4%)
CIE-LABlab(38.52, 46.40, -67.76)
CIE-LCHlch(38.52, 82.12, 304.40°)
OKLaboklab(48.99% 0.0492 -0.1949)
OKLCHoklch(48.99% 0.201 284.2)
XYZxyz(16.9409, 10.3809, 57.5994)
Luminance0.1038 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A42CB #B3CB42
analogous
#426ECB #5A42CB #9E42CB
triadic
#5A42CB #CB5A42 #42CB5A
tetradic
#5A42CB #CB426E #B3CB42 #42CB9E
square
#5A42CB #CB426E #B3CB42 #42CB9E
split-complementary
#5A42CB #CB9E42 #6ECB42
monochromatic
#2E2073 #422DA3 #5A42CB #8472D8 #AEA2E5

Accessibility & contrast

On white

6.83
#5A42CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.08
#5A42CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A42CB
6.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A42CB#FFFFFF#000000##FFFFFF
##5A42CB1.006.833.086.83
#FFFFFF6.831.0021.001.00
#0000003.0821.001.0021.00
##FFFFFF6.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FCF
Deuteranopia (green-blind)
#0056C8
Tritanopia (blue-blind)
#246581
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5a42cb;
/* rgb */ color: rgb(90, 66, 203);
/* oklch */ color: oklch(49.0% 0.201 284.2);
Tailwind
colors: {
  custom: {
    50: '#9478dc',
    500: '#5a42cb',
    950: '#000000',
  },
}
SCSS
$custom: #5a42cb;
$custom-light: #9478dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5a42cb",
  "rgb": {
    "r": 90,
    "g": 66,
    "b": 203
  },
  "hsl": {
    "h": 250.511,
    "s": 56.846,
    "l": 52.745
  },
  "oklch": {
    "l": 0.48992,
    "c": 0.20098,
    "h": 284.2
  },
  "luminance": 0.10382
}

Semantic roles & 50–950 ramp

primary
#5A42CB
secondary
#C8D297
accent
#E048C5
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A42CB

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

Preview Lab → · Contrast checker → · Palette generator →

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