#5B40D4#5B40D4

#5B40D4 is a mid, highly saturated violet. Relative luminance 0.106; OKLCH L 49.6% C 0.214 H 283.7°. Best body text is #FFFFFF at 6.71:1 contrast (WCAG AA passes).

Color values

HEX#5B40D4
RGBrgb(91, 64, 212)
HSLhsl(251, 63%, 54%)
HSVhsv(251, 70%, 83%)
CMYKcmyk(57.1%, 69.8%, 0%, 16.9%)
CIE-LABlab(38.97, 50.33, -72.21)
CIE-LCHlch(38.97, 88.02, 304.87°)
OKLaboklab(49.58% 0.0508 -0.2079)
OKLCHoklch(49.58% 0.214 283.7)
XYZxyz(18.0278, 10.6433, 63.3790)
Luminance0.1064 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40D4 #B9D440
analogous
#406FD4 #5B40D4 #A540D4
triadic
#5B40D4 #D45B40 #40D45B
tetradic
#5B40D4 #D4406F #B9D440 #40D4A5
square
#5B40D4 #D4406F #B9D440 #40D4A5
split-complementary
#5B40D4 #D4A540 #6FD440
monochromatic
#2E1C7D #4027AF #5B40D4 #8672DF #B1A4EA

Accessibility & contrast

On white

6.71
#5B40D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.13
#5B40D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40D4
6.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40D4#FFFFFF#000000##FFFFFF
##5B40D41.006.713.136.71
#FFFFFF6.711.0021.001.00
#0000003.1321.001.0021.00
##FFFFFF6.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060D8
Deuteranopia (green-blind)
#0057D1
Tritanopia (blue-blind)
#196785
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #5b40d4;
/* rgb */ color: rgb(91, 64, 212);
/* oklch */ color: oklch(49.6% 0.214 283.7);
Tailwind
colors: {
  custom: {
    50: '#9677e2',
    500: '#5b40d4',
    950: '#000000',
  },
}
SCSS
$custom: #5b40d4;
$custom-light: #9677e2;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40d4",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 250.946,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.49576,
    "c": 0.21399,
    "h": 283.7
  },
  "luminance": 0.10644
}

Semantic roles & 50–950 ramp

primary
#5B40D4
secondary
#CCD798
accent
#E642C8
background
#F9F7FE
surface
#F2EDFC
border
#CCC8D5
text
#0F0916
muted
#7E7B84

Preview Lab

Preview with #5B40D4

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

Preview Lab → · Contrast checker → · Palette generator →

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