#5F40E0#5F40E0

#5F40E0 is a mid, highly saturated violet. Relative luminance 0.115; OKLCH L 51.0% C 0.228 H 283.7°. Best body text is #FFFFFF at 6.37:1 contrast (WCAG AA passes).

Color values

HEX#5F40E0
RGBrgb(95, 64, 224)
HSLhsl(252, 72%, 56%)
HSVhsv(252, 71%, 88%)
CMYKcmyk(57.6%, 71.4%, 0%, 12.2%)
CIE-LABlab(40.38, 54.40, -76.77)
CIE-LCHlch(40.38, 94.09, 305.32°)
OKLaboklab(50.98% 0.0539 -0.2211)
OKLCHoklch(50.98% 0.228 283.7)
XYZxyz(20.0031, 11.4802, 71.6684)
Luminance0.1148 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40E0 #C1E040
analogous
#4071E0 #5F40E0 #AF40E0
triadic
#5F40E0 #E05F40 #40E05F
tetradic
#5F40E0 #E04071 #C1E040 #40E0AF
square
#5F40E0 #E04071 #C1E040 #40E0AF
split-complementary
#5F40E0 #E0AF40 #71E040
monochromatic
#2E178E #3F20C3 #5F40E0 #8B75E9 #B7A9F1

Accessibility & contrast

On white

6.37
#5F40E0 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.30
#5F40E0 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40E0
6.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40E0#FFFFFF#000000##FFFFFF
##5F40E01.006.373.306.37
#FFFFFF6.371.0021.001.00
#0000003.3021.001.0021.00
##FFFFFF6.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064E5
Deuteranopia (green-blind)
#005ADD
Tritanopia (blue-blind)
#136C8C
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #5f40e0;
/* rgb */ color: rgb(95, 64, 224);
/* oklch */ color: oklch(51.0% 0.228 283.7);
Tailwind
colors: {
  custom: {
    50: '#9a78eb',
    500: '#5f40e0',
    950: '#000000',
  },
}
SCSS
$custom: #5f40e0;
$custom-light: #9a78eb;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40e0",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 224
  },
  "hsl": {
    "h": 251.625,
    "s": 72.072,
    "l": 56.471
  },
  "oklch": {
    "l": 0.50983,
    "c": 0.2276,
    "h": 283.7
  },
  "luminance": 0.11482
}

Semantic roles & 50–950 ramp

primary
#5F40E0
secondary
#D2DF9D
accent
#EF39CC
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F40E0

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

Preview Lab → · Contrast checker → · Palette generator →

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