#5B40D7#5B40D7

#5B40D7 is a mid, highly saturated violet. Relative luminance 0.108; OKLCH L 49.8% C 0.218 H 283.3°. Best body text is #FFFFFF at 6.65:1 contrast (WCAG AA passes).

Color values

HEX#5B40D7
RGBrgb(91, 64, 215)
HSLhsl(251, 65%, 55%)
HSVhsv(251, 70%, 84%)
CMYKcmyk(57.7%, 70.2%, 0%, 15.7%)
CIE-LABlab(39.23, 51.21, -73.51)
CIE-LCHlch(39.23, 89.59, 304.87°)
OKLaboklab(49.84% 0.0502 -0.2117)
OKLCHoklch(49.84% 0.218 283.3)
XYZxyz(18.4097, 10.7961, 65.3906)
Luminance0.1080 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40D7 #BCD740
analogous
#4071D7 #5B40D7 #A640D7
triadic
#5B40D7 #D75B40 #40D75B
tetradic
#5B40D7 #D74071 #BCD740 #40D7A6
square
#5B40D7 #D74071 #BCD740 #40D7A6
split-complementary
#5B40D7 #D7A640 #71D740
monochromatic
#2D1B81 #3F26B4 #5B40D7 #8673E2 #B2A5EC

Accessibility & contrast

On white

6.65
#5B40D7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.16
#5B40D7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40D7
6.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40D7#FFFFFF#000000##FFFFFF
##5B40D71.006.653.166.65
#FFFFFF6.651.0021.001.00
#0000003.1621.001.0021.00
##FFFFFF6.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061DB
Deuteranopia (green-blind)
#0057D4
Tritanopia (blue-blind)
#126887
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #5b40d7;
/* rgb */ color: rgb(91, 64, 215);
/* oklch */ color: oklch(49.8% 0.218 283.3);
Tailwind
colors: {
  custom: {
    50: '#9677e5',
    500: '#5b40d7',
    950: '#000000',
  },
}
SCSS
$custom: #5b40d7;
$custom-light: #9677e5;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40d7",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 215
  },
  "hsl": {
    "h": 250.728,
    "s": 65.368,
    "l": 54.706
  },
  "oklch": {
    "l": 0.49843,
    "c": 0.21755,
    "h": 283.3
  },
  "luminance": 0.10797
}

Semantic roles & 50–950 ramp

primary
#5B40D7
secondary
#CED99A
accent
#E83FCA
background
#F9F7FE
surface
#F2EDFC
border
#CCC8D5
text
#0F0916
muted
#7E7B84

Preview Lab

Preview with #5B40D7

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

Preview Lab → · Contrast checker → · Palette generator →

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