#5A40BB#5A40BB

#5A40BB is a mid, vivid violet. Relative luminance 0.094; OKLCH L 47.3% C 0.184 H 286.9°. Best body text is #FFFFFF at 7.28:1 contrast (WCAG AA passes).

Color values

HEX#5A40BB
RGBrgb(90, 64, 187)
HSLhsl(253, 49%, 49%)
HSVhsv(253, 66%, 73%)
CMYKcmyk(51.9%, 65.8%, 0%, 26.7%)
CIE-LABlab(36.79, 42.74, -61.22)
CIE-LCHlch(36.79, 74.67, 304.92°)
OKLaboklab(47.35% 0.0532 -0.1757)
OKLCHoklch(47.35% 0.184 286.9)
XYZxyz(15.0168, 9.4276, 48.0325)
Luminance0.0943 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40BB #A1BB40
analogous
#4064BB #5A40BB #9840BB
triadic
#5A40BB #BB5A40 #40BB5A
tetradic
#5A40BB #BB4064 #A1BB40 #40BB98
square
#5A40BB #BB4064 #A1BB40 #40BB98
split-complementary
#5A40BB #BB9840 #64BB40
monochromatic
#2E2160 #44308D #5A40BB #806CCD #A799DC

Accessibility & contrast

On white

7.28
#5A40BB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.89
#5A40BB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A40BB
7.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40BB#FFFFFF#000000##FFFFFF
##5A40BB1.007.282.897.28
#FFFFFF7.281.0021.001.00
#0000002.8921.001.0021.00
##FFFFFF7.281.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5a40bb;
/* rgb */ color: rgb(90, 64, 187);
/* oklch */ color: oklch(47.3% 0.184 286.9);
Tailwind
colors: {
  custom: {
    50: '#9176d0',
    500: '#5a40bb',
    950: '#000000',
  },
}
SCSS
$custom: #5a40bb;
$custom-light: #9176d0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40bb",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 187
  },
  "hsl": {
    "h": 252.683,
    "s": 49.004,
    "l": 49.216
  },
  "oklch": {
    "l": 0.47345,
    "c": 0.18356,
    "h": 286.9
  },
  "luminance": 0.09428
}

Semantic roles & 50–950 ramp

primary
#5A40BB
secondary
#BCC88F
accent
#D94FBC
background
#F9F7FC
surface
#F2EDF9
border
#CCC8D2
text
#0E0914
muted
#7E7B82

Preview Lab

Preview with #5A40BB

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

Preview Lab → · Contrast checker → · Palette generator →

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