#5840BD#5840BD

#5840BD is a mid, vivid violet. Relative luminance 0.094; OKLCH L 47.3% C 0.186 H 285.6°. Best body text is #FFFFFF at 7.28:1 contrast (WCAG AA passes).

Color values

HEX#5840BD
RGBrgb(88, 64, 189)
HSLhsl(252, 49%, 50%)
HSVhsv(252, 66%, 74%)
CMYKcmyk(53.4%, 66.1%, 0%, 25.9%)
CIE-LABlab(36.77, 42.98, -62.45)
CIE-LCHlch(36.77, 75.81, 304.54°)
OKLaboklab(47.33% 0.0502 -0.1793)
OKLCHoklch(47.33% 0.186 285.6)
XYZxyz(15.0405, 9.4148, 49.1590)
Luminance0.0942 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5840BD #A5BD40
analogous
#4067BD #5840BD #9740BD
triadic
#5840BD #BD5840 #40BD58
tetradic
#5840BD #BD4067 #A5BD40 #40BD97
square
#5840BD #BD4067 #A5BD40 #40BD97
split-complementary
#5840BD #BD9740 #67BD40
monochromatic
#2D2162 #43318F #5840BD #7F6DCD #A79ADD

Accessibility & contrast

On white

7.28
#5840BD on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.88
#5840BD on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5840BD
7.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5840BD#FFFFFF#000000##FFFFFF
##5840BD1.007.282.887.28
#FFFFFF7.281.0021.001.00
#0000002.8821.001.0021.00
##FFFFFF7.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC1
Deuteranopia (green-blind)
#0053BB
Tritanopia (blue-blind)
#2E5F79
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #5840bd;
/* rgb */ color: rgb(88, 64, 189);
/* oklch */ color: oklch(47.3% 0.186 285.6);
Tailwind
colors: {
  custom: {
    50: '#9076d2',
    500: '#5840bd',
    950: '#000000',
  },
}
SCSS
$custom: #5840bd;
$custom-light: #9076d2;
$custom-dark: #000000;
JSON
{
  "hex": "#5840bd",
  "rgb": {
    "r": 88,
    "g": 64,
    "b": 189
  },
  "hsl": {
    "h": 251.52,
    "s": 49.407,
    "l": 49.608
  },
  "oklch": {
    "l": 0.47333,
    "c": 0.18623,
    "h": 285.6
  },
  "luminance": 0.09416
}

Semantic roles & 50–950 ramp

primary
#5840BD
secondary
#BEC990
accent
#D94FBE
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5840BD

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

Preview Lab → · Contrast checker → · Palette generator →

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