#5B40BB#5B40BB

#5B40BB is a mid, vivid violet. Relative luminance 0.095; OKLCH L 47.4% C 0.183 H 287.3°. Best body text is #FFFFFF at 7.25:1 contrast (WCAG AA passes).

Color values

HEX#5B40BB
RGBrgb(91, 64, 187)
HSLhsl(253, 49%, 49%)
HSVhsv(253, 66%, 73%)
CMYKcmyk(51.3%, 65.8%, 0%, 26.7%)
CIE-LABlab(36.89, 42.92, -61.07)
CIE-LCHlch(36.89, 74.64, 305.10°)
OKLaboklab(47.44% 0.0546 -0.1752)
OKLCHoklch(47.44% 0.183 287.3)
XYZxyz(15.1148, 9.4781, 48.0371)
Luminance0.0948 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40BB #A0BB40
analogous
#4063BB #5B40BB #9940BB
triadic
#5B40BB #BB5B40 #40BB5B
tetradic
#5B40BB #BB4063 #A0BB40 #40BB99
square
#5B40BB #BB4063 #A0BB40 #40BB99
split-complementary
#5B40BB #BB9940 #63BB40
monochromatic
#2F2160 #45308D #5B40BB #816CCD #A899DC

Accessibility & contrast

On white

7.25
#5B40BB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.90
#5B40BB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B40BB
7.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40BB#FFFFFF#000000##FFFFFF
##5B40BB1.007.252.907.25
#FFFFFF7.251.0021.001.00
#0000002.9021.001.0021.00
##FFFFFF7.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ABF
Deuteranopia (green-blind)
#0053B9
Tritanopia (blue-blind)
#375E78
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5b40bb;
/* rgb */ color: rgb(91, 64, 187);
/* oklch */ color: oklch(47.4% 0.183 287.3);
Tailwind
colors: {
  custom: {
    50: '#9276d0',
    500: '#5b40bb',
    950: '#000000',
  },
}
SCSS
$custom: #5b40bb;
$custom-light: #9276d0;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40bb",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 187
  },
  "hsl": {
    "h": 253.171,
    "s": 49.004,
    "l": 49.216
  },
  "oklch": {
    "l": 0.47435,
    "c": 0.18349,
    "h": 287.3
  },
  "luminance": 0.09479
}

Semantic roles & 50–950 ramp

primary
#5B40BB
secondary
#BBC88F
accent
#D94FBA
background
#F9F7FC
surface
#F2EDF9
border
#CCC8D2
text
#0E0914
muted
#7E7B82

Preview Lab

Preview with #5B40BB

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

Preview Lab → · Contrast checker → · Palette generator →

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