#5F40E1#5F40E1

#5F40E1 is a mid, highly saturated violet. Relative luminance 0.115; OKLCH L 51.1% C 0.229 H 283.6°. Best body text is #FFFFFF at 6.35:1 contrast (WCAG AA passes).

Color values

HEX#5F40E1
RGBrgb(95, 64, 225)
HSLhsl(252, 73%, 57%)
HSVhsv(252, 72%, 88%)
CMYKcmyk(57.8%, 71.6%, 0%, 11.8%)
CIE-LABlab(40.47, 54.69, -77.20)
CIE-LCHlch(40.47, 94.61, 305.32°)
OKLaboklab(51.07% 0.0537 -0.2224)
OKLCHoklch(51.07% 0.229 283.6)
XYZxyz(20.1391, 11.5346, 72.3847)
Luminance0.1154 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40E1 #C2E140
analogous
#4072E1 #5F40E1 #B040E1
triadic
#5F40E1 #E15F40 #40E15F
tetradic
#5F40E1 #E14072 #C2E140 #40E1B0
square
#5F40E1 #E14072 #C2E140 #40E1B0
split-complementary
#5F40E1 #E1B040 #72E140
monochromatic
#2E1790 #3F1FC5 #5F40E1 #8B75E9 #B8AAF2

Accessibility & contrast

On white

6.35
#5F40E1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.31
#5F40E1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40E1
6.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40E1#FFFFFF#000000##FFFFFF
##5F40E11.006.353.316.35
#FFFFFF6.351.0021.001.00
#0000003.3121.001.0021.00
##FFFFFF6.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064E6
Deuteranopia (green-blind)
#005ADE
Tritanopia (blue-blind)
#106C8D
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #5f40e1;
/* rgb */ color: rgb(95, 64, 225);
/* oklch */ color: oklch(51.1% 0.229 283.6);
Tailwind
colors: {
  custom: {
    50: '#9a78ec',
    500: '#5f40e1',
    950: '#000000',
  },
}
SCSS
$custom: #5f40e1;
$custom-light: #9a78ec;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40e1",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 225
  },
  "hsl": {
    "h": 251.553,
    "s": 72.851,
    "l": 56.667
  },
  "oklch": {
    "l": 0.51074,
    "c": 0.22876,
    "h": 283.6
  },
  "luminance": 0.11536
}

Semantic roles & 50–950 ramp

primary
#5F40E1
secondary
#D3DF9D
accent
#F038CC
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F40E1

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

Preview Lab → · Contrast checker → · Palette generator →

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