#5A42BC#5A42BC

#5A42BC is a mid, vivid violet. Relative luminance 0.097; OKLCH L 47.7% C 0.182 H 286.3°. Best body text is #FFFFFF at 7.14:1 contrast (WCAG AA passes).

Color values

HEX#5A42BC
RGBrgb(90, 66, 188)
HSLhsl(252, 48%, 50%)
HSVhsv(252, 65%, 74%)
CMYKcmyk(52.1%, 64.9%, 0%, 26.3%)
CIE-LABlab(37.30, 41.89, -60.99)
CIE-LCHlch(37.30, 73.99, 304.48°)
OKLaboklab(47.73% 0.0511 -0.175)
OKLCHoklch(47.73% 0.182 286.3)
XYZxyz(15.2391, 9.7002, 48.6365)
Luminance0.0970 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A42BC #A4BC42
analogous
#4267BC #5A42BC #9742BC
triadic
#5A42BC #BC5A42 #42BC5A
tetradic
#5A42BC #BC4267 #A4BC42 #42BC97
square
#5A42BC #BC4267 #A4BC42 #42BC97
split-complementary
#5A42BC #BC9742 #67BC42
monochromatic
#2F2261 #44328F #5A42BC #816FCC #A99CDC

Accessibility & contrast

On white

7.14
#5A42BC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.94
#5A42BC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A42BC
7.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A42BC#FFFFFF#000000##FFFFFF
##5A42BC1.007.142.947.14
#FFFFFF7.141.0021.001.00
#0000002.9421.001.0021.00
##FFFFFF7.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BC0
Deuteranopia (green-blind)
#0054BA
Tritanopia (blue-blind)
#346079
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5a42bc;
/* rgb */ color: rgb(90, 66, 188);
/* oklch */ color: oklch(47.7% 0.182 286.3);
Tailwind
colors: {
  custom: {
    50: '#9178d1',
    500: '#5a42bc',
    950: '#000000',
  },
}
SCSS
$custom: #5a42bc;
$custom-light: #9178d1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a42bc",
  "rgb": {
    "r": 90,
    "g": 66,
    "b": 188
  },
  "hsl": {
    "h": 251.803,
    "s": 48.031,
    "l": 49.804
  },
  "oklch": {
    "l": 0.47734,
    "c": 0.18231,
    "h": 286.3
  },
  "luminance": 0.09701
}

Semantic roles & 50–950 ramp

primary
#5A42BC
secondary
#BEC991
accent
#D850BD
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5A42BC

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

Preview Lab → · Contrast checker → · Palette generator →

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