#5A40BA#5A40BA

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

Color values

HEX#5A40BA
RGBrgb(90, 64, 186)
HSLhsl(253, 49%, 49%)
HSVhsv(253, 66%, 73%)
CMYKcmyk(51.6%, 65.6%, 0%, 27.1%)
CIE-LABlab(36.72, 42.44, -60.77)
CIE-LCHlch(36.72, 74.12, 304.93°)
OKLaboklab(47.26% 0.0533 -0.1743)
OKLCHoklch(47.26% 0.182 287)
XYZxyz(14.9102, 9.3849, 47.4707)
Luminance0.0939 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40BA #A0BA40
analogous
#4063BA #5A40BA #9740BA
triadic
#5A40BA #BA5A40 #40BA5A
tetradic
#5A40BA #BA4063 #A0BA40 #40BA97
square
#5A40BA #BA4063 #A0BA40 #40BA97
split-complementary
#5A40BA #BA9740 #63BA40
monochromatic
#2E215F #44308C #5A40BA #806BCC #A799DC

Accessibility & contrast

On white

7.30
#5A40BA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.88
#5A40BA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A40BA
7.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40BA#FFFFFF#000000##FFFFFF
##5A40BA1.007.302.887.30
#FFFFFF7.301.0021.001.00
#0000002.8821.001.0021.00
##FFFFFF7.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0059BE
Deuteranopia (green-blind)
#0053B8
Tritanopia (blue-blind)
#365E77
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #5a40ba;
/* rgb */ color: rgb(90, 64, 186);
/* oklch */ color: oklch(47.3% 0.182 287.0);
Tailwind
colors: {
  custom: {
    50: '#9176d0',
    500: '#5a40ba',
    950: '#000000',
  },
}
SCSS
$custom: #5a40ba;
$custom-light: #9176d0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40ba",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 186
  },
  "hsl": {
    "h": 252.787,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.47262,
    "c": 0.18231,
    "h": 287
  },
  "luminance": 0.09386
}

Semantic roles & 50–950 ramp

primary
#5A40BA
secondary
#BBC88E
accent
#D84FBB
background
#F9F7FC
surface
#F2EDF9
border
#CCC8D2
text
#0E0914
muted
#7E7B82

Preview Lab

Preview with #5A40BA

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

Preview Lab → · Contrast checker → · Palette generator →

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