#5B40CA#5B40CA

#5B40CA is a mid, highly saturated violet. Relative luminance 0.102; OKLCH L 48.7% C 0.202 H 285.1°. Best body text is #FFFFFF at 6.93:1 contrast (WCAG AA passes).

Color values

HEX#5B40CA
RGBrgb(91, 64, 202)
HSLhsl(252, 57%, 52%)
HSVhsv(252, 68%, 79%)
CMYKcmyk(55%, 68.3%, 0%, 20.8%)
CIE-LABlab(38.12, 47.37, -67.83)
CIE-LCHlch(38.12, 82.73, 304.93°)
OKLaboklab(48.7% 0.0525 -0.195)
OKLCHoklch(48.7% 0.202 285.1)
XYZxyz(16.8052, 10.1542, 56.9401)
Luminance0.1016 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40CA #AFCA40
analogous
#406ACA #5B40CA #A040CA
triadic
#5B40CA #CA5B40 #40CA5B
tetradic
#5B40CA #CA406A #AFCA40 #40CAA0
square
#5B40CA #CA406A #AFCA40 #40CAA0
split-complementary
#5B40CA #CAA040 #6ACA40
monochromatic
#2F1F70 #432CA0 #5B40CA #8470D7 #ADA0E5

Accessibility & contrast

On white

6.93
#5B40CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.03
#5B40CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40CA
6.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40CA#FFFFFF#000000##FFFFFF
##5B40CA1.006.933.036.93
#FFFFFF6.931.0021.001.00
#0000003.0321.001.0021.00
##FFFFFF6.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECE
Deuteranopia (green-blind)
#0055C7
Tritanopia (blue-blind)
#296480
Achromatopsia (no color)
#5A5A5A

Design tokens & code

CSS
--color: #5b40ca;
/* rgb */ color: rgb(91, 64, 202);
/* oklch */ color: oklch(48.7% 0.202 285.1);
Tailwind
colors: {
  custom: {
    50: '#9477db',
    500: '#5b40ca',
    950: '#000000',
  },
}
SCSS
$custom: #5b40ca;
$custom-light: #9477db;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40ca",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 202
  },
  "hsl": {
    "h": 251.739,
    "s": 56.557,
    "l": 52.157
  },
  "oklch": {
    "l": 0.48701,
    "c": 0.20196,
    "h": 285.1
  },
  "luminance": 0.10155
}

Semantic roles & 50–950 ramp

primary
#5B40CA
secondary
#C5D195
accent
#E048C2
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5B40CA

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

Preview Lab → · Contrast checker → · Palette generator →

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