#5B42CC#5B42CC

#5B42CC is a mid, highly saturated violet. Relative luminance 0.105; OKLCH L 49.2% C 0.202 H 284.4°. Best body text is #FFFFFF at 6.78:1 contrast (WCAG AA passes).

Color values

HEX#5B42CC
RGBrgb(91, 66, 204)
HSLhsl(251, 58%, 53%)
HSVhsv(251, 68%, 80%)
CMYKcmyk(55.4%, 67.6%, 0%, 20%)
CIE-LABlab(38.69, 46.86, -68.05)
CIE-LCHlch(38.69, 82.62, 304.55°)
OKLaboklab(49.16% 0.0504 -0.1957)
OKLCHoklch(49.16% 0.202 284.4)
XYZxyz(17.1584, 10.4792, 58.2336)
Luminance0.1048 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B42CC #B3CC42
analogous
#426ECC #5B42CC #A042CC
triadic
#5B42CC #CC5B42 #42CC5B
tetradic
#5B42CC #CC426E #B3CC42 #42CCA0
square
#5B42CC #CC426E #B3CC42 #42CCA0
split-complementary
#5B42CC #CCA042 #6ECC42
monochromatic
#2F1F74 #422CA4 #5B42CC #8572D9 #AFA2E6

Accessibility & contrast

On white

6.78
#5B42CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.10
#5B42CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B42CC
6.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B42CC#FFFFFF#000000##FFFFFF
##5B42CC1.006.783.106.78
#FFFFFF6.781.0021.001.00
#0000003.1021.001.0021.00
##FFFFFF6.781.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5b42cc;
/* rgb */ color: rgb(91, 66, 204);
/* oklch */ color: oklch(49.2% 0.202 284.4);
Tailwind
colors: {
  custom: {
    50: '#9478dd',
    500: '#5b42cc',
    950: '#000000',
  },
}
SCSS
$custom: #5b42cc;
$custom-light: #9478dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5b42cc",
  "rgb": {
    "r": 91,
    "g": 66,
    "b": 204
  },
  "hsl": {
    "h": 250.87,
    "s": 57.5,
    "l": 52.941
  },
  "oklch": {
    "l": 0.49163,
    "c": 0.20209,
    "h": 284.4
  },
  "luminance": 0.1048
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5B42CC

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

Preview Lab → · Contrast checker → · Palette generator →

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