#5840C8#5840C8

#5840C8 is a mid, vivid violet. Relative luminance 0.099; OKLCH L 48.3% C 0.200 H 284.1°. Best body text is #FFFFFF at 7.04:1 contrast (WCAG AA passes).

Color values

HEX#5840C8
RGBrgb(88, 64, 200)
HSLhsl(251, 55%, 52%)
HSVhsv(251, 68%, 78%)
CMYKcmyk(56%, 68%, 0%, 21.6%)
CIE-LABlab(37.68, 46.29, -67.39)
CIE-LCHlch(37.68, 81.76, 304.49°)
OKLaboklab(48.27% 0.0487 -0.1938)
OKLCHoklch(48.27% 0.2 284.1)
XYZxyz(16.2800, 9.9107, 55.6875)
Luminance0.0991 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5840C8 #B0C840
analogous
#406CC8 #5840C8 #9C40C8
triadic
#5840C8 #C85840 #40C858
tetradic
#5840C8 #C8406C #B0C840 #40C89C
square
#5840C8 #C8406C #B0C840 #40C89C
split-complementary
#5840C8 #C89C40 #6CC840
monochromatic
#2D206E #412D9D #5840C8 #8270D6 #AB9FE3

Accessibility & contrast

On white

7.04
#5840C8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.98
#5840C8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5840C8
7.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5840C8#FFFFFF#000000##FFFFFF
##5840C81.007.042.987.04
#FFFFFF7.041.0021.001.00
#0000002.9821.001.0021.00
##FFFFFF7.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCC
Deuteranopia (green-blind)
#0054C5
Tritanopia (blue-blind)
#21637F
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5840c8;
/* rgb */ color: rgb(88, 64, 200);
/* oklch */ color: oklch(48.3% 0.200 284.1);
Tailwind
colors: {
  custom: {
    50: '#9277da',
    500: '#5840c8',
    950: '#000000',
  },
}
SCSS
$custom: #5840c8;
$custom-light: #9277da;
$custom-dark: #000000;
JSON
{
  "hex": "#5840c8",
  "rgb": {
    "r": 88,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 250.588,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.4827,
    "c": 0.19986,
    "h": 284.1
  },
  "luminance": 0.09912
}

Semantic roles & 50–950 ramp

primary
#5840C8
secondary
#C5D094
accent
#DF49C4
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5840C8

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

Preview Lab → · Contrast checker → · Palette generator →

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