#5B40D2#5B40D2

#5B40D2 is a mid, highly saturated violet. Relative luminance 0.105; OKLCH L 49.4% C 0.212 H 284.0°. Best body text is #FFFFFF at 6.76:1 contrast (WCAG AA passes).

Color values

HEX#5B40D2
RGBrgb(91, 64, 210)
HSLhsl(251, 62%, 54%)
HSVhsv(251, 70%, 82%)
CMYKcmyk(56.7%, 69.5%, 0%, 17.6%)
CIE-LABlab(38.80, 49.74, -71.34)
CIE-LCHlch(38.80, 86.97, 304.88°)
OKLaboklab(49.4% 0.0511 -0.2053)
OKLCHoklch(49.4% 0.212 284)
XYZxyz(17.7771, 10.5430, 62.0585)
Luminance0.1054 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40D2 #B7D240
analogous
#406ED2 #5B40D2 #A440D2
triadic
#5B40D2 #D25B40 #40D25B
tetradic
#5B40D2 #D2406E #B7D240 #40D2A4
square
#5B40D2 #D2406E #B7D240 #40D2A4
split-complementary
#5B40D2 #D2A440 #6ED240
monochromatic
#2E1D7B #4129AC #5B40D2 #8672DE #B0A3E9

Accessibility & contrast

On white

6.76
#5B40D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.11
#5B40D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40D2
6.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40D2#FFFFFF#000000##FFFFFF
##5B40D21.006.763.116.76
#FFFFFF6.761.0021.001.00
#0000003.1121.001.0021.00
##FFFFFF6.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060D6
Deuteranopia (green-blind)
#0057CF
Tritanopia (blue-blind)
#1D6784
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5b40d2;
/* rgb */ color: rgb(91, 64, 210);
/* oklch */ color: oklch(49.4% 0.212 284.0);
Tailwind
colors: {
  custom: {
    50: '#9577e1',
    500: '#5b40d2',
    950: '#000000',
  },
}
SCSS
$custom: #5b40d2;
$custom-light: #9577e1;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40d2",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 251.096,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.49399,
    "c": 0.21161,
    "h": 284
  },
  "luminance": 0.10544
}

Semantic roles & 50–950 ramp

primary
#5B40D2
secondary
#CBD698
accent
#E543C7
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5B40D2

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

Preview Lab → · Contrast checker → · Palette generator →

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