#5B40C8#5B40C8

#5B40C8 is a mid, vivid violet. Relative luminance 0.101; OKLCH L 48.5% C 0.200 H 285.3°. Best body text is #FFFFFF at 6.97:1 contrast (WCAG AA passes).

Color values

HEX#5B40C8
RGBrgb(91, 64, 200)
HSLhsl(252, 55%, 52%)
HSVhsv(252, 68%, 78%)
CMYKcmyk(54.5%, 68%, 0%, 21.6%)
CIE-LABlab(37.95, 46.77, -66.94)
CIE-LCHlch(37.95, 81.66, 304.94°)
OKLaboklab(48.53% 0.0528 -0.1924)
OKLCHoklch(48.53% 0.2 285.3)
XYZxyz(16.5700, 10.0601, 55.7011)
Luminance0.1006 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40C8 #ADC840
analogous
#4069C8 #5B40C8 #9F40C8
triadic
#5B40C8 #C85B40 #40C85B
tetradic
#5B40C8 #C84069 #ADC840 #40C89F
square
#5B40C8 #C84069 #ADC840 #40C89F
split-complementary
#5B40C8 #C89F40 #69C840
monochromatic
#2F206E #442D9D #5B40C8 #8470D6 #AD9FE3

Accessibility & contrast

On white

6.97
#5B40C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.01
#5B40C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40C8
6.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40C8#FFFFFF#000000##FFFFFF
##5B40C81.006.973.016.97
#FFFFFF6.971.0021.001.00
#0000003.0121.001.0021.00
##FFFFFF6.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCC
Deuteranopia (green-blind)
#0055C5
Tritanopia (blue-blind)
#2B637F
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5b40c8;
/* rgb */ color: rgb(91, 64, 200);
/* oklch */ color: oklch(48.5% 0.200 285.3);
Tailwind
colors: {
  custom: {
    50: '#9477da',
    500: '#5b40c8',
    950: '#000000',
  },
}
SCSS
$custom: #5b40c8;
$custom-light: #9477da;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40c8",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 251.912,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.48529,
    "c": 0.19953,
    "h": 285.3
  },
  "luminance": 0.10061
}

Semantic roles & 50–950 ramp

primary
#5B40C8
secondary
#C4D094
accent
#DF49C1
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5B40C8

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

Preview Lab → · Contrast checker → · Palette generator →

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