#5840C7#5840C7

#5840C7 is a mid, vivid violet. Relative luminance 0.099; OKLCH L 48.2% C 0.199 H 284.2°. Best body text is #FFFFFF at 7.06:1 contrast (WCAG AA passes).

Color values

HEX#5840C7
RGBrgb(88, 64, 199)
HSLhsl(251, 55%, 52%)
HSVhsv(251, 68%, 78%)
CMYKcmyk(55.8%, 67.8%, 0%, 22%)
CIE-LABlab(37.60, 45.99, -66.94)
CIE-LCHlch(37.60, 81.22, 304.49°)
OKLaboklab(48.18% 0.0488 -0.1925)
OKLCHoklch(48.18% 0.199 284.2)
XYZxyz(16.1636, 9.8641, 55.0740)
Luminance0.0987 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5840C7 #AFC740
analogous
#406CC7 #5840C7 #9C40C7
triadic
#5840C7 #C75840 #40C758
tetradic
#5840C7 #C7406C #AFC740 #40C79C
square
#5840C7 #C7406C #AFC740 #40C79C
split-complementary
#5840C7 #C79C40 #6CC740
monochromatic
#2E206D #412E9C #5840C7 #816FD5 #AB9FE3

Accessibility & contrast

On white

7.06
#5840C7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.97
#5840C7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5840C7
7.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5840C7#FFFFFF#000000##FFFFFF
##5840C71.007.062.977.06
#FFFFFF7.061.0021.001.00
#0000002.9721.001.0021.00
##FFFFFF7.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005CCB
Deuteranopia (green-blind)
#0054C4
Tritanopia (blue-blind)
#23637E
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5840c7;
/* rgb */ color: rgb(88, 64, 199);
/* oklch */ color: oklch(48.2% 0.199 284.2);
Tailwind
colors: {
  custom: {
    50: '#9277d9',
    500: '#5840c7',
    950: '#000000',
  },
}
SCSS
$custom: #5840c7;
$custom-light: #9277d9;
$custom-dark: #000000;
JSON
{
  "hex": "#5840c7",
  "rgb": {
    "r": 88,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 250.667,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.48184,
    "c": 0.19863,
    "h": 284.2
  },
  "luminance": 0.09865
}

Semantic roles & 50–950 ramp

primary
#5840C7
secondary
#C5CF94
accent
#DE4AC4
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5840C7

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

Preview Lab → · Contrast checker → · Palette generator →

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