#5B40BF#5B40BF

#5B40BF is a mid, vivid violet. Relative luminance 0.097; OKLCH L 47.8% C 0.188 H 286.7°. Best body text is #FFFFFF at 7.17:1 contrast (WCAG AA passes).

Color values

HEX#5B40BF
RGBrgb(91, 64, 191)
HSLhsl(253, 50%, 50%)
HSVhsv(253, 66%, 75%)
CMYKcmyk(52.4%, 66.5%, 0%, 25.1%)
CIE-LABlab(37.21, 44.11, -62.89)
CIE-LCHlch(37.21, 76.82, 305.04°)
OKLaboklab(47.77% 0.0541 -0.1805)
OKLCHoklch(47.77% 0.188 286.7)
XYZxyz(15.5490, 9.6517, 50.3238)
Luminance0.0965 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40BF #A4BF40
analogous
#4064BF #5B40BF #9B40BF
triadic
#5B40BF #BF5B40 #40BF5B
tetradic
#5B40BF #BF4064 #A4BF40 #40BF9B
square
#5B40BF #BF4064 #A4BF40 #40BF9B
split-complementary
#5B40BF #BF9B40 #64BF40
monochromatic
#2F2163 #453191 #5B40BF #826ECE #AA9CDE

Accessibility & contrast

On white

7.17
#5B40BF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.93
#5B40BF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B40BF
7.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40BF#FFFFFF#000000##FFFFFF
##5B40BF1.007.172.937.17
#FFFFFF7.171.0021.001.00
#0000002.9321.001.0021.00
##FFFFFF7.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BC3
Deuteranopia (green-blind)
#0054BC
Tritanopia (blue-blind)
#34607A
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5b40bf;
/* rgb */ color: rgb(91, 64, 191);
/* oklch */ color: oklch(47.8% 0.188 286.7);
Tailwind
colors: {
  custom: {
    50: '#9277d3',
    500: '#5b40bf',
    950: '#000000',
  },
}
SCSS
$custom: #5b40bf;
$custom-light: #9277d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40bf",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 191
  },
  "hsl": {
    "h": 252.756,
    "s": 49.804,
    "l": 50
  },
  "oklch": {
    "l": 0.47767,
    "c": 0.18848,
    "h": 286.7
  },
  "luminance": 0.09653
}

Semantic roles & 50–950 ramp

primary
#5B40BF
secondary
#BECA91
accent
#D94EBC
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5B40BF

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

Preview Lab → · Contrast checker → · Palette generator →

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