#5B40BE#5B40BE

#5B40BE is a mid, vivid violet. Relative luminance 0.096; OKLCH L 47.7% C 0.187 H 286.8°. Best body text is #FFFFFF at 7.19:1 contrast (WCAG AA passes).

Color values

HEX#5B40BE
RGBrgb(91, 64, 190)
HSLhsl(253, 50%, 50%)
HSVhsv(253, 66%, 75%)
CMYKcmyk(52.1%, 66.3%, 0%, 25.5%)
CIE-LABlab(37.13, 43.81, -62.44)
CIE-LCHlch(37.13, 76.27, 305.06°)
OKLaboklab(47.68% 0.0542 -0.1792)
OKLCHoklch(47.68% 0.187 286.8)
XYZxyz(15.4393, 9.6079, 49.7462)
Luminance0.0961 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40BE #A3BE40
analogous
#4064BE #5B40BE #9A40BE
triadic
#5B40BE #BE5B40 #40BE5B
tetradic
#5B40BE #BE4064 #A3BE40 #40BE9A
square
#5B40BE #BE4064 #A3BE40 #40BE9A
split-complementary
#5B40BE #BE9A40 #64BE40
monochromatic
#2F2162 #453190 #5B40BE #826DCE #A99BDD

Accessibility & contrast

On white

7.19
#5B40BE on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.92
#5B40BE on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B40BE
7.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40BE#FFFFFF#000000##FFFFFF
##5B40BE1.007.192.927.19
#FFFFFF7.191.0021.001.00
#0000002.9221.001.0021.00
##FFFFFF7.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC2
Deuteranopia (green-blind)
#0054BB
Tritanopia (blue-blind)
#355F79
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5b40be;
/* rgb */ color: rgb(91, 64, 190);
/* oklch */ color: oklch(47.7% 0.187 286.8);
Tailwind
colors: {
  custom: {
    50: '#9277d3',
    500: '#5b40be',
    950: '#000000',
  },
}
SCSS
$custom: #5b40be;
$custom-light: #9277d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40be",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 190
  },
  "hsl": {
    "h": 252.857,
    "s": 49.606,
    "l": 49.804
  },
  "oklch": {
    "l": 0.47684,
    "c": 0.18723,
    "h": 286.8
  },
  "luminance": 0.09609
}

Semantic roles & 50–950 ramp

primary
#5B40BE
secondary
#BDC990
accent
#D94FBB
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5B40BE

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

Preview Lab → · Contrast checker → · Palette generator →

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