#5840B2#5840B2

#5840B2 is a mid, vivid violet. Relative luminance 0.090; OKLCH L 46.4% C 0.172 H 287.4°. Best body text is #FFFFFF at 7.52:1 contrast (WCAG AA passes).

Color values

HEX#5840B2
RGBrgb(88, 64, 178)
HSLhsl(253, 47%, 47%)
HSVhsv(253, 64%, 70%)
CMYKcmyk(50.6%, 64%, 0%, 30.2%)
CIE-LABlab(35.90, 39.68, -57.38)
CIE-LCHlch(35.90, 69.76, 304.66°)
OKLaboklab(46.43% 0.0515 -0.1644)
OKLCHoklch(46.43% 0.172 287.4)
XYZxyz(13.8914, 8.9552, 43.1074)
Luminance0.0896 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5840B2 #9AB240
analogous
#4061B2 #5840B2 #9140B2
triadic
#5840B2 #B25840 #40B258
tetradic
#5840B2 #B24061 #9AB240 #40B291
square
#5840B2 #B24061 #9AB240 #40B291
split-complementary
#5840B2 #B29140 #61B240
monochromatic
#2B2058 #423085 #5840B2 #7B67C8 #A294D8

Accessibility & contrast

On white

7.52
#5840B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.79
#5840B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5840B2
7.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5840B2#FFFFFF#000000##FFFFFF
##5840B21.007.522.797.52
#FFFFFF7.521.0021.001.00
#0000002.7921.001.0021.00
##FFFFFF7.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057B6
Deuteranopia (green-blind)
#0051B0
Tritanopia (blue-blind)
#385B73
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #5840b2;
/* rgb */ color: rgb(88, 64, 178);
/* oklch */ color: oklch(46.4% 0.172 287.4);
Tailwind
colors: {
  custom: {
    50: '#8f76ca',
    500: '#5840b2',
    950: '#000000',
  },
}
SCSS
$custom: #5840b2;
$custom-light: #8f76ca;
$custom-dark: #000000;
JSON
{
  "hex": "#5840b2",
  "rgb": {
    "r": 88,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 252.632,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.46428,
    "c": 0.1723,
    "h": 287.4
  },
  "luminance": 0.08956
}

Semantic roles & 50–950 ramp

primary
#5840B2
secondary
#B8C48A
accent
#D751BB
background
#F9F7FC
surface
#F1EDF8
border
#CBC8D1
text
#0D0813
muted
#7E7B82

Preview Lab

Preview with #5840B2

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

Preview Lab → · Contrast checker → · Palette generator →

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