#5840BF#5840BF

#5840BF is a mid, vivid violet. Relative luminance 0.095; OKLCH L 47.5% C 0.189 H 285.3°. Best body text is #FFFFFF at 7.24:1 contrast (WCAG AA passes).

Color values

HEX#5840BF
RGBrgb(88, 64, 191)
HSLhsl(251, 50%, 50%)
HSVhsv(251, 66%, 75%)
CMYKcmyk(53.9%, 66.5%, 0%, 25.1%)
CIE-LABlab(36.93, 43.58, -63.35)
CIE-LCHlch(36.93, 76.90, 304.53°)
OKLaboklab(47.5% 0.05 -0.182)
OKLCHoklch(47.5% 0.189 285.3)
XYZxyz(15.2590, 9.5023, 50.3102)
Luminance0.0950 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5840BF #A7BF40
analogous
#4067BF #5840BF #9840BF
triadic
#5840BF #BF5840 #40BF58
tetradic
#5840BF #BF4067 #A7BF40 #40BF98
square
#5840BF #BF4067 #A7BF40 #40BF98
split-complementary
#5840BF #BF9840 #67BF40
monochromatic
#2E2163 #433191 #5840BF #806ECE #A89CDE

Accessibility & contrast

On white

7.24
#5840BF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.90
#5840BF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5840BF
7.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5840BF#FFFFFF#000000##FFFFFF
##5840BF1.007.242.907.24
#FFFFFF7.241.0021.001.00
#0000002.9021.001.0021.00
##FFFFFF7.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC3
Deuteranopia (green-blind)
#0053BC
Tritanopia (blue-blind)
#2C607A
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5840bf;
/* rgb */ color: rgb(88, 64, 191);
/* oklch */ color: oklch(47.5% 0.189 285.3);
Tailwind
colors: {
  custom: {
    50: '#9176d3',
    500: '#5840bf',
    950: '#000000',
  },
}
SCSS
$custom: #5840bf;
$custom-light: #9176d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5840bf",
  "rgb": {
    "r": 88,
    "g": 64,
    "b": 191
  },
  "hsl": {
    "h": 251.339,
    "s": 49.804,
    "l": 50
  },
  "oklch": {
    "l": 0.47501,
    "c": 0.18873,
    "h": 285.3
  },
  "luminance": 0.09503
}

Semantic roles & 50–950 ramp

primary
#5840BF
secondary
#BFCA91
accent
#D94EBF
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5840BF

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

Preview Lab → · Contrast checker → · Palette generator →

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