#5A42BB#5A42BB

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

Color values

HEX#5A42BB
RGBrgb(90, 66, 187)
HSLhsl(252, 48%, 50%)
HSVhsv(252, 65%, 73%)
CMYKcmyk(51.9%, 64.7%, 0%, 26.7%)
CIE-LABlab(37.22, 41.59, -60.53)
CIE-LCHlch(37.22, 73.44, 304.49°)
OKLaboklab(47.65% 0.0513 -0.1736)
OKLCHoklch(47.65% 0.181 286.4)
XYZxyz(15.1316, 9.6572, 48.0708)
Luminance0.0966 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A42BB #A3BB42
analogous
#4267BB #5A42BB #9742BB
triadic
#5A42BB #BB5A42 #42BB5A
tetradic
#5A42BB #BB4267 #A3BB42 #42BB97
square
#5A42BB #BB4267 #A3BB42 #42BB97
split-complementary
#5A42BB #BB9742 #67BB42
monochromatic
#2E2261 #44328E #5A42BB #816ECC #A89CDC

Accessibility & contrast

On white

7.16
#5A42BB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.93
#5A42BB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A42BB
7.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A42BB#FFFFFF#000000##FFFFFF
##5A42BB1.007.162.937.16
#FFFFFF7.161.0021.001.00
#0000002.9321.001.0021.00
##FFFFFF7.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BBF
Deuteranopia (green-blind)
#0054B9
Tritanopia (blue-blind)
#356078
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5a42bb;
/* rgb */ color: rgb(90, 66, 187);
/* oklch */ color: oklch(47.7% 0.181 286.4);
Tailwind
colors: {
  custom: {
    50: '#9178d0',
    500: '#5a42bb',
    950: '#000000',
  },
}
SCSS
$custom: #5a42bb;
$custom-light: #9178d0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a42bb",
  "rgb": {
    "r": 90,
    "g": 66,
    "b": 187
  },
  "hsl": {
    "h": 251.901,
    "s": 47.826,
    "l": 49.608
  },
  "oklch": {
    "l": 0.47652,
    "c": 0.18105,
    "h": 286.4
  },
  "luminance": 0.09658
}

Semantic roles & 50–950 ramp

primary
#5A42BB
secondary
#BDC891
accent
#D750BD
background
#F9F7FC
surface
#F2EDF9
border
#CCC8D2
text
#0E0914
muted
#7E7B82

Preview Lab

Preview with #5A42BB

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

Preview Lab → · Contrast checker → · Palette generator →

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