#5840C2#5840C2

#5840C2 is a mid, vivid violet. Relative luminance 0.096; OKLCH L 47.8% C 0.192 H 284.9°. Best body text is #FFFFFF at 7.17:1 contrast (WCAG AA passes).

Color values

HEX#5840C2
RGBrgb(88, 64, 194)
HSLhsl(251, 52%, 51%)
HSVhsv(251, 67%, 76%)
CMYKcmyk(54.6%, 67%, 0%, 23.9%)
CIE-LABlab(37.18, 44.49, -64.71)
CIE-LCHlch(37.18, 78.52, 304.51°)
OKLaboklab(47.76% 0.0495 -0.186)
OKLCHoklch(47.76% 0.192 284.9)
XYZxyz(15.5926, 9.6357, 52.0667)
Luminance0.0964 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5840C2 #AAC240
analogous
#4069C2 #5840C2 #9940C2
triadic
#5840C2 #C25840 #40C258
tetradic
#5840C2 #C24069 #AAC240 #40C299
square
#5840C2 #C24069 #AAC240 #40C299
split-complementary
#5840C2 #C29940 #69C240
monochromatic
#2E2167 #423095 #5840C2 #816ED1 #A99DE0

Accessibility & contrast

On white

7.17
#5840C2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.93
#5840C2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5840C2
7.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5840C2#FFFFFF#000000##FFFFFF
##5840C21.007.172.937.17
#FFFFFF7.171.0021.001.00
#0000002.9321.001.0021.00
##FFFFFF7.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BC6
Deuteranopia (green-blind)
#0053BF
Tritanopia (blue-blind)
#29617C
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5840c2;
/* rgb */ color: rgb(88, 64, 194);
/* oklch */ color: oklch(47.8% 0.192 284.9);
Tailwind
colors: {
  custom: {
    50: '#9177d5',
    500: '#5840c2',
    950: '#000000',
  },
}
SCSS
$custom: #5840c2;
$custom-light: #9177d5;
$custom-dark: #000000;
JSON
{
  "hex": "#5840c2",
  "rgb": {
    "r": 88,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 251.077,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.47755,
    "c": 0.19246,
    "h": 284.9
  },
  "luminance": 0.09637
}

Semantic roles & 50–950 ramp

primary
#5840C2
secondary
#C1CC92
accent
#DB4DC1
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5840C2

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

Preview Lab → · Contrast checker → · Palette generator →

#5840C2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva