#5A40BC#5A40BC

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

Color values

HEX#5A40BC
RGBrgb(90, 64, 188)
HSLhsl(253, 49%, 49%)
HSVhsv(253, 66%, 74%)
CMYKcmyk(52.1%, 66%, 0%, 26.3%)
CIE-LABlab(36.87, 43.04, -61.68)
CIE-LCHlch(36.87, 75.21, 304.90°)
OKLaboklab(47.43% 0.0531 -0.177)
OKLCHoklch(47.43% 0.185 286.7)
XYZxyz(15.1243, 9.4705, 48.5983)
Luminance0.0947 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40BC #A2BC40
analogous
#4064BC #5A40BC #9840BC
triadic
#5A40BC #BC5A40 #40BC5A
tetradic
#5A40BC #BC4064 #A2BC40 #40BC98
square
#5A40BC #BC4064 #A2BC40 #40BC98
split-complementary
#5A40BC #BC9840 #64BC40
monochromatic
#2E2161 #44308E #5A40BC #806CCD #A89ADD

Accessibility & contrast

On white

7.26
#5A40BC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A40BC
7.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40BC#FFFFFF#000000##FFFFFF
##5A40BC1.007.262.897.26
#FFFFFF7.261.0021.001.00
#0000002.8921.001.0021.00
##FFFFFF7.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC0
Deuteranopia (green-blind)
#0053BA
Tritanopia (blue-blind)
#345F78
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5a40bc;
/* rgb */ color: rgb(90, 64, 188);
/* oklch */ color: oklch(47.4% 0.185 286.7);
Tailwind
colors: {
  custom: {
    50: '#9176d1',
    500: '#5a40bc',
    950: '#000000',
  },
}
SCSS
$custom: #5a40bc;
$custom-light: #9176d1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40bc",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 188
  },
  "hsl": {
    "h": 252.581,
    "s": 49.206,
    "l": 49.412
  },
  "oklch": {
    "l": 0.47427,
    "c": 0.18481,
    "h": 286.7
  },
  "luminance": 0.09471
}

Semantic roles & 50–950 ramp

primary
#5A40BC
secondary
#BDC98F
accent
#D94FBC
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5A40BC

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

Preview Lab → · Contrast checker → · Palette generator →

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