#5840BC#5840BC

#5840BC is a mid, vivid violet. Relative luminance 0.094; OKLCH L 47.2% C 0.185 H 285.8°. Best body text is #FFFFFF at 7.31:1 contrast (WCAG AA passes).

Color values

HEX#5840BC
RGBrgb(88, 64, 188)
HSLhsl(252, 49%, 49%)
HSVhsv(252, 66%, 74%)
CMYKcmyk(53.2%, 66%, 0%, 26.3%)
CIE-LABlab(36.69, 42.68, -61.99)
CIE-LCHlch(36.69, 75.26, 304.55°)
OKLaboklab(47.25% 0.0504 -0.178)
OKLCHoklch(47.25% 0.185 285.8)
XYZxyz(14.9323, 9.3715, 48.5893)
Luminance0.0937 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5840BC #A4BC40
analogous
#4066BC #5840BC #9640BC
triadic
#5840BC #BC5840 #40BC58
tetradic
#5840BC #BC4066 #A4BC40 #40BC96
square
#5840BC #BC4066 #A4BC40 #40BC96
split-complementary
#5840BC #BC9640 #66BC40
monochromatic
#2D2161 #43308E #5840BC #7F6CCD #A79ADD

Accessibility & contrast

On white

7.31
#5840BC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.87
#5840BC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5840BC
7.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5840BC#FFFFFF#000000##FFFFFF
##5840BC1.007.312.877.31
#FFFFFF7.311.0021.001.00
#0000002.8721.001.0021.00
##FFFFFF7.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC0
Deuteranopia (green-blind)
#0053BA
Tritanopia (blue-blind)
#2F5F78
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #5840bc;
/* rgb */ color: rgb(88, 64, 188);
/* oklch */ color: oklch(47.2% 0.185 285.8);
Tailwind
colors: {
  custom: {
    50: '#9076d1',
    500: '#5840bc',
    950: '#000000',
  },
}
SCSS
$custom: #5840bc;
$custom-light: #9076d1;
$custom-dark: #000000;
JSON
{
  "hex": "#5840bc",
  "rgb": {
    "r": 88,
    "g": 64,
    "b": 188
  },
  "hsl": {
    "h": 251.613,
    "s": 49.206,
    "l": 49.412
  },
  "oklch": {
    "l": 0.47249,
    "c": 0.18498,
    "h": 285.8
  },
  "luminance": 0.09372
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5840BC

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

Preview Lab → · Contrast checker → · Palette generator →

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