#5B40E1#5B40E1

#5B40E1 is a mid, highly saturated violet. Relative luminance 0.113; OKLCH L 50.7% C 0.229 H 282.1°. Best body text is #FFFFFF at 6.43:1 contrast (WCAG AA passes).

Color values

HEX#5B40E1
RGBrgb(91, 64, 225)
HSLhsl(250, 73%, 57%)
HSVhsv(250, 72%, 88%)
CMYKcmyk(59.6%, 71.6%, 0%, 11.8%)
CIE-LABlab(40.12, 54.16, -77.77)
CIE-LCHlch(40.12, 94.77, 304.85°)
OKLaboklab(50.75% 0.0483 -0.2242)
OKLCHoklch(50.75% 0.229 282.1)
XYZxyz(19.7341, 11.3258, 72.3658)
Luminance0.1133 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40E1 #C6E140
analogous
#4076E1 #5B40E1 #AC40E1
triadic
#5B40E1 #E15B40 #40E15B
tetradic
#5B40E1 #E14076 #C6E140 #40E1AC
square
#5B40E1 #E14076 #C6E140 #40E1AC
split-complementary
#5B40E1 #E1AC40 #76E140
monochromatic
#2B1790 #3B1FC5 #5B40E1 #8875E9 #B6AAF2

Accessibility & contrast

On white

6.43
#5B40E1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.27
#5B40E1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40E1
6.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40E1#FFFFFF#000000##FFFFFF
##5B40E11.006.433.276.43
#FFFFFF6.431.0021.001.00
#0000003.2721.001.0021.00
##FFFFFF6.431.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5b40e1;
/* rgb */ color: rgb(91, 64, 225);
/* oklch */ color: oklch(50.7% 0.229 282.1);
Tailwind
colors: {
  custom: {
    50: '#9878ec',
    500: '#5b40e1',
    950: '#000000',
  },
}
SCSS
$custom: #5b40e1;
$custom-light: #9878ec;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40e1",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 225
  },
  "hsl": {
    "h": 250.062,
    "s": 72.851,
    "l": 56.667
  },
  "oklch": {
    "l": 0.50746,
    "c": 0.22931,
    "h": 282.1
  },
  "luminance": 0.11327
}

Semantic roles & 50–950 ramp

primary
#5B40E1
secondary
#D4DF9D
accent
#F038D1
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5B40E1

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

Preview Lab → · Contrast checker → · Palette generator →

#5B40E1 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva