#5B40CB#5B40CB

#5B40CB is a mid, highly saturated violet. Relative luminance 0.102; OKLCH L 48.8% C 0.203 H 284.9°. Best body text is #FFFFFF at 6.91:1 contrast (WCAG AA passes).

Color values

HEX#5B40CB
RGBrgb(91, 64, 203)
HSLhsl(252, 57%, 52%)
HSVhsv(252, 68%, 80%)
CMYKcmyk(55.2%, 68.5%, 0%, 20.4%)
CIE-LABlab(38.20, 47.66, -68.27)
CIE-LCHlch(38.20, 83.26, 304.92°)
OKLaboklab(48.79% 0.0523 -0.1963)
OKLCHoklch(48.79% 0.203 284.9)
XYZxyz(16.9240, 10.2018, 57.5657)
Luminance0.1020 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40CB #B0CB40
analogous
#406ACB #5B40CB #A140CB
triadic
#5B40CB #CB5B40 #40CB5B
tetradic
#5B40CB #CB406A #B0CB40 #40CBA1
square
#5B40CB #CB406A #B0CB40 #40CBA1
split-complementary
#5B40CB #CBA140 #6ACB40
monochromatic
#2F1F72 #432CA2 #5B40CB #8470D8 #AEA0E5

Accessibility & contrast

On white

6.91
#5B40CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.04
#5B40CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40CB
6.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40CB#FFFFFF#000000##FFFFFF
##5B40CB1.006.913.046.91
#FFFFFF6.911.0021.001.00
#0000003.0421.001.0021.00
##FFFFFF6.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECF
Deuteranopia (green-blind)
#0056C8
Tritanopia (blue-blind)
#276480
Achromatopsia (no color)
#5A5A5A

Design tokens & code

CSS
--color: #5b40cb;
/* rgb */ color: rgb(91, 64, 203);
/* oklch */ color: oklch(48.8% 0.203 284.9);
Tailwind
colors: {
  custom: {
    50: '#9477dc',
    500: '#5b40cb',
    950: '#000000',
  },
}
SCSS
$custom: #5b40cb;
$custom-light: #9477dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40cb",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 251.655,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.48787,
    "c": 0.20318,
    "h": 284.9
  },
  "luminance": 0.10203
}

Semantic roles & 50–950 ramp

primary
#5B40CB
secondary
#C6D295
accent
#E047C3
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5B40CB

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

Preview Lab → · Contrast checker → · Palette generator →

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