#5E40B7#5E40B7

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

Color values

HEX#5E40B7
RGBrgb(94, 64, 183)
HSLhsl(255, 48%, 48%)
HSVhsv(255, 65%, 72%)
CMYKcmyk(48.6%, 65%, 0%, 28.2%)
CIE-LABlab(36.86, 42.30, -58.74)
CIE-LCHlch(36.86, 72.39, 305.76°)
OKLaboklab(47.39% 0.0592 -0.1682)
OKLCHoklch(47.39% 0.178 289.4)
XYZxyz(14.9943, 9.4648, 45.8274)
Luminance0.0946 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E40B7 #99B740
analogous
#405DB7 #5E40B7 #9940B7
triadic
#5E40B7 #B75E40 #40B75E
tetradic
#5E40B7 #B7405D #99B740 #40B799
square
#5E40B7 #B7405D #99B740 #40B799
split-complementary
#5E40B7 #B79940 #5DB740
monochromatic
#2F205C #47308A #5E40B7 #8269CB #A897DB

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##5E40B7#FFFFFF#000000##FFFFFF
##5E40B71.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)
#0059BB
Deuteranopia (green-blind)
#0054B5
Tritanopia (blue-blind)
#405D76
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5e40b7;
/* rgb */ color: rgb(94, 64, 183);
/* oklch */ color: oklch(47.4% 0.178 289.4);
Tailwind
colors: {
  custom: {
    50: '#9377cd',
    500: '#5e40b7',
    950: '#000000',
  },
}
SCSS
$custom: #5e40b7;
$custom-light: #9377cd;
$custom-dark: #000000;
JSON
{
  "hex": "#5e40b7",
  "rgb": {
    "r": 94,
    "g": 64,
    "b": 183
  },
  "hsl": {
    "h": 255.126,
    "s": 48.178,
    "l": 48.431
  },
  "oklch": {
    "l": 0.47388,
    "c": 0.17836,
    "h": 289.4
  },
  "luminance": 0.09465
}

Semantic roles & 50–950 ramp

primary
#5E40B7
secondary
#B8C68D
accent
#D850B6
background
#F9F7FC
surface
#F2EDF9
border
#CCC8D2
text
#0E0914
muted
#7E7B82

Preview Lab

Preview with #5E40B7

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

Preview Lab → · Contrast checker → · Palette generator →

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