#5840E1#5840E1

#5840E1 is a mid, highly saturated blue. Relative luminance 0.112; OKLCH L 50.5% C 0.230 H 281.1°. Best body text is #FFFFFF at 6.49:1 contrast (WCAG AA passes).

Color values

HEX#5840E1
RGBrgb(88, 64, 225)
HSLhsl(249, 73%, 57%)
HSVhsv(249, 72%, 88%)
CMYKcmyk(60.9%, 71.6%, 0%, 11.8%)
CIE-LABlab(39.88, 53.77, -78.19)
CIE-LCHlch(39.88, 94.89, 304.52°)
OKLaboklab(50.51% 0.0442 -0.2255)
OKLCHoklch(50.51% 0.23 281.1)
XYZxyz(19.4442, 11.1763, 72.3522)
Luminance0.1118 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5840E1 #C9E140
analogous
#4079E1 #5840E1 #A940E1
triadic
#5840E1 #E15840 #40E158
tetradic
#5840E1 #E14079 #C9E140 #40E1A9
square
#5840E1 #E14079 #C9E140 #40E1A9
split-complementary
#5840E1 #E1A940 #79E140
monochromatic
#291790 #381FC5 #5840E1 #8675E9 #B4AAF2

Accessibility & contrast

On white

6.49
#5840E1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.24
#5840E1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5840E1
6.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5840E1#FFFFFF#000000##FFFFFF
##5840E11.006.493.246.49
#FFFFFF6.491.0021.001.00
#0000003.2421.001.0021.00
##FFFFFF6.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064E6
Deuteranopia (green-blind)
#0058DE
Tritanopia (blue-blind)
#006C8D
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5840e1;
/* rgb */ color: rgb(88, 64, 225);
/* oklch */ color: oklch(50.5% 0.230 281.1);
Tailwind
colors: {
  custom: {
    50: '#9678ec',
    500: '#5840e1',
    950: '#000000',
  },
}
SCSS
$custom: #5840e1;
$custom-light: #9678ec;
$custom-dark: #000000;
JSON
{
  "hex": "#5840e1",
  "rgb": {
    "r": 88,
    "g": 64,
    "b": 225
  },
  "hsl": {
    "h": 248.944,
    "s": 72.851,
    "l": 56.667
  },
  "oklch": {
    "l": 0.50508,
    "c": 0.22976,
    "h": 281.1
  },
  "luminance": 0.11178
}

Semantic roles & 50–950 ramp

primary
#5840E1
secondary
#D6DF9D
accent
#F038D4
background
#FAF7FE
surface
#F3EDFD
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5840E1

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

Preview Lab → · Contrast checker → · Palette generator →

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