#5A40BE#5A40BE

#5A40BE is a mid, vivid violet. Relative luminance 0.096; OKLCH L 47.6% C 0.187 H 286.4°. Best body text is #FFFFFF at 7.21:1 contrast (WCAG AA passes).

Color values

HEX#5A40BE
RGBrgb(90, 64, 190)
HSLhsl(252, 50%, 50%)
HSVhsv(252, 66%, 75%)
CMYKcmyk(52.6%, 66.3%, 0%, 25.5%)
CIE-LABlab(37.04, 43.63, -62.59)
CIE-LCHlch(37.04, 76.30, 304.88°)
OKLaboklab(47.59% 0.0528 -0.1797)
OKLCHoklch(47.59% 0.187 286.4)
XYZxyz(15.3413, 9.5574, 49.7416)
Luminance0.0956 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40BE #A4BE40
analogous
#4065BE #5A40BE #9940BE
triadic
#5A40BE #BE5A40 #40BE5A
tetradic
#5A40BE #BE4065 #A4BE40 #40BE99
square
#5A40BE #BE4065 #A4BE40 #40BE99
split-complementary
#5A40BE #BE9940 #65BE40
monochromatic
#2F2162 #443190 #5A40BE #816DCE #A99BDD

Accessibility & contrast

On white

7.21
#5A40BE on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.91
#5A40BE on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A40BE
7.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40BE#FFFFFF#000000##FFFFFF
##5A40BE1.007.212.917.21
#FFFFFF7.211.0021.001.00
#0000002.9121.001.0021.00
##FFFFFF7.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC2
Deuteranopia (green-blind)
#0053BB
Tritanopia (blue-blind)
#326079
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5a40be;
/* rgb */ color: rgb(90, 64, 190);
/* oklch */ color: oklch(47.6% 0.187 286.4);
Tailwind
colors: {
  custom: {
    50: '#9277d3',
    500: '#5a40be',
    950: '#000000',
  },
}
SCSS
$custom: #5a40be;
$custom-light: #9277d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40be",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 190
  },
  "hsl": {
    "h": 252.381,
    "s": 49.606,
    "l": 49.804
  },
  "oklch": {
    "l": 0.47594,
    "c": 0.18731,
    "h": 286.4
  },
  "luminance": 0.09558
}

Semantic roles & 50–950 ramp

primary
#5A40BE
secondary
#BEC990
accent
#D94FBD
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5A40BE

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

Preview Lab → · Contrast checker → · Palette generator →

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