#5B40CC#5B40CC

#5B40CC is a mid, highly saturated violet. Relative luminance 0.103; OKLCH L 48.9% C 0.204 H 284.8°. Best body text is #FFFFFF at 6.88:1 contrast (WCAG AA passes).

Color values

HEX#5B40CC
RGBrgb(91, 64, 204)
HSLhsl(252, 58%, 53%)
HSVhsv(252, 69%, 80%)
CMYKcmyk(55.4%, 68.6%, 0%, 20%)
CIE-LABlab(38.29, 47.96, -68.71)
CIE-LCHlch(38.29, 83.79, 304.91°)
OKLaboklab(48.87% 0.0521 -0.1976)
OKLCHoklch(48.87% 0.204 284.8)
XYZxyz(17.0436, 10.2496, 58.1953)
Luminance0.1025 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B40CC #B1CC40
analogous
#406BCC #5B40CC #A140CC
triadic
#5B40CC #CC5B40 #40CC5B
tetradic
#5B40CC #CC406B #B1CC40 #40CCA1
square
#5B40CC #CC406B #B1CC40 #40CCA1
split-complementary
#5B40CC #CCA140 #6BCC40
monochromatic
#2F1F73 #432CA3 #5B40CC #8470D9 #AEA1E6

Accessibility & contrast

On white

6.88
#5B40CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.05
#5B40CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5B40CC
6.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B40CC#FFFFFF#000000##FFFFFF
##5B40CC1.006.883.056.88
#FFFFFF6.881.0021.001.00
#0000003.0521.001.0021.00
##FFFFFF6.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ED0
Deuteranopia (green-blind)
#0056C9
Tritanopia (blue-blind)
#266481
Achromatopsia (no color)
#5A5A5A

Design tokens & code

CSS
--color: #5b40cc;
/* rgb */ color: rgb(91, 64, 204);
/* oklch */ color: oklch(48.9% 0.204 284.8);
Tailwind
colors: {
  custom: {
    50: '#9477dd',
    500: '#5b40cc',
    950: '#000000',
  },
}
SCSS
$custom: #5b40cc;
$custom-light: #9477dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5b40cc",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 204
  },
  "hsl": {
    "h": 251.571,
    "s": 57.851,
    "l": 52.549
  },
  "oklch": {
    "l": 0.48874,
    "c": 0.20438,
    "h": 284.8
  },
  "luminance": 0.10251
}

Semantic roles & 50–950 ramp

primary
#5B40CC
secondary
#C7D295
accent
#E147C3
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5B40CC

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

Preview Lab → · Contrast checker → · Palette generator →

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