#5B40C7#5B40C7

#5B40C7 is a mid, vivid violet. Relative luminance 0.100; OKLCH L 48.4% C 0.198 H 285.5°. Best body text is #FFFFFF at 6.99:1 contrast (WCAG AA passes).

Color values

HEX#5B40C7
RGBrgb(91, 64, 199)
HSLhsl(252, 55%, 52%)
HSVhsv(252, 68%, 78%)
CMYKcmyk(54.3%, 67.8%, 0%, 22%)
CIE-LABlab(37.87, 46.48, -66.49)
CIE-LCHlch(37.87, 81.13, 304.95°)
OKLaboklab(48.44% 0.0529 -0.1911)
OKLCHoklch(48.44% 0.198 285.5)
XYZxyz(16.4535, 10.0135, 55.0876)
Luminance0.1001 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40C7 #ACC740
analogous
#4069C7 #5B40C7 #9F40C7
triadic
#5B40C7 #C75B40 #40C75B
tetradic
#5B40C7 #C74069 #ACC740 #40C79F
square
#5B40C7 #C74069 #ACC740 #40C79F
split-complementary
#5B40C7 #C79F40 #69C740
monochromatic
#2F206D #442E9C #5B40C7 #846FD5 #AC9FE3

Accessibility & contrast

On white

6.99
#5B40C7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.00
#5B40C7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40C7
6.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40C7#FFFFFF#000000##FFFFFF
##5B40C71.006.993.006.99
#FFFFFF6.991.0021.001.00
#0000003.0021.001.0021.00
##FFFFFF6.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCB
Deuteranopia (green-blind)
#0055C4
Tritanopia (blue-blind)
#2C637E
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5b40c7;
/* rgb */ color: rgb(91, 64, 199);
/* oklch */ color: oklch(48.4% 0.198 285.5);
Tailwind
colors: {
  custom: {
    50: '#9477d9',
    500: '#5b40c7',
    950: '#000000',
  },
}
SCSS
$custom: #5b40c7;
$custom-light: #9477d9;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40c7",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 252,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.48443,
    "c": 0.19831,
    "h": 285.5
  },
  "luminance": 0.10014
}

Semantic roles & 50–950 ramp

primary
#5B40C7
secondary
#C3CF94
accent
#DE4AC0
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5B40C7

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

Preview Lab → · Contrast checker → · Palette generator →

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