#5B42D8#5B42D8

#5B42D8 is a mid, highly saturated violet. Relative luminance 0.111; OKLCH L 50.2% C 0.217 H 282.9°. Best body text is #FFFFFF at 6.53:1 contrast (WCAG AA passes).

Color values

HEX#5B42D8
RGBrgb(91, 66, 216)
HSLhsl(250, 66%, 55%)
HSVhsv(250, 69%, 85%)
CMYKcmyk(57.9%, 69.4%, 0%, 15.3%)
CIE-LABlab(39.71, 50.43, -73.30)
CIE-LCHlch(39.71, 88.98, 304.53°)
OKLaboklab(50.21% 0.0485 -0.2111)
OKLCHoklch(50.21% 0.217 282.9)
XYZxyz(18.6534, 11.0772, 66.1076)
Luminance0.1108 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B42D8 #BFD842
analogous
#4274D8 #5B42D8 #A642D8
triadic
#5B42D8 #D85B42 #42D85B
tetradic
#5B42D8 #D84274 #BFD842 #42D8A6
square
#5B42D8 #D84274 #BFD842 #42D8A6
split-complementary
#5B42D8 #D8A642 #74D842
monochromatic
#2D1B84 #3E26B7 #5B42D8 #8775E2 #B3A7ED

Accessibility & contrast

On white

6.53
#5B42D8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.22
#5B42D8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B42D8
6.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B42D8#FFFFFF#000000##FFFFFF
##5B42D81.006.533.226.53
#FFFFFF6.531.0021.001.00
#0000003.2221.001.0021.00
##FFFFFF6.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062DC
Deuteranopia (green-blind)
#0058D5
Tritanopia (blue-blind)
#0E6A88
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5b42d8;
/* rgb */ color: rgb(91, 66, 216);
/* oklch */ color: oklch(50.2% 0.217 282.9);
Tailwind
colors: {
  custom: {
    50: '#9679e5',
    500: '#5b42d8',
    950: '#000000',
  },
}
SCSS
$custom: #5b42d8;
$custom-light: #9679e5;
$custom-dark: #000000;
JSON
{
  "hex": "#5b42d8",
  "rgb": {
    "r": 91,
    "g": 66,
    "b": 216
  },
  "hsl": {
    "h": 250,
    "s": 65.789,
    "l": 55.294
  },
  "oklch": {
    "l": 0.50208,
    "c": 0.21658,
    "h": 282.9
  },
  "luminance": 0.11078
}

Semantic roles & 50–950 ramp

primary
#5B42D8
secondary
#D0DA9C
accent
#E93FCC
background
#F9F7FE
surface
#F2EDFC
border
#CCC8D5
text
#0F0916
muted
#7E7B84

Preview Lab

Preview with #5B42D8

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

Preview Lab → · Contrast checker → · Palette generator →

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