#5E40A2#5E40A2

#5E40A2 is a mid, vivid violet. Relative luminance 0.087; OKLCH L 45.8% C 0.152 H 293.6°. Best body text is #FFFFFF at 7.69:1 contrast (WCAG AA passes).

Color values

HEX#5E40A2
RGBrgb(94, 64, 162)
HSLhsl(258, 43%, 44%)
HSVhsv(258, 60%, 64%)
CMYKcmyk(42%, 60.5%, 0%, 36.5%)
CIE-LABlab(35.31, 36.24, -48.75)
CIE-LCHlch(35.31, 60.75, 306.63°)
OKLaboklab(45.77% 0.0608 -0.1389)
OKLCHoklch(45.77% 0.152 293.6)
XYZxyz(12.9693, 8.6548, 35.1626)
Luminance0.0866 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E40A2 #84A240
analogous
#4053A2 #5E40A2 #8F40A2
triadic
#5E40A2 #A25E40 #40A25E
tetradic
#5E40A2 #A24053 #84A240 #40A28F
square
#5E40A2 #A24053 #84A240 #40A28F
split-complementary
#5E40A2 #A28F40 #53A240
monochromatic
#2B1D4A #452F76 #5E40A2 #7D5FC0 #A18BD1

Accessibility & contrast

On white

7.69
#5E40A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.73
#5E40A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5E40A2
7.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5E40A2#FFFFFF#000000##FFFFFF
##5E40A21.007.692.737.69
#FFFFFF7.691.0021.001.00
#0000002.7321.001.0021.00
##FFFFFF7.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054A5
Deuteranopia (green-blind)
#0951A0
Tritanopia (blue-blind)
#4C566B
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #5e40a2;
/* rgb */ color: rgb(94, 64, 162);
/* oklch */ color: oklch(45.8% 0.152 293.6);
Tailwind
colors: {
  custom: {
    50: '#9076be',
    500: '#5e40a2',
    950: '#000000',
  },
}
SCSS
$custom: #5e40a2;
$custom-light: #9076be;
$custom-dark: #000000;
JSON
{
  "hex": "#5e40a2",
  "rgb": {
    "r": 94,
    "g": 64,
    "b": 162
  },
  "hsl": {
    "h": 258.367,
    "s": 43.363,
    "l": 44.314
  },
  "oklch": {
    "l": 0.45768,
    "c": 0.15159,
    "h": 293.6
  },
  "luminance": 0.08655
}

Semantic roles & 50–950 ramp

primary
#5E40A2
secondary
#AABC82
accent
#D355AC
background
#F9F7FB
surface
#F1EDF7
border
#CBC8D0
text
#0D0812
muted
#7E7B81

Preview Lab

Preview with #5E40A2

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

Preview Lab → · Contrast checker → · Palette generator →

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