#5F40CE#5F40CE

#5F40CE is a mid, highly saturated violet. Relative luminance 0.106; OKLCH L 49.4% C 0.206 H 286.1°. Best body text is #FFFFFF at 6.75:1 contrast (WCAG AA passes).

Color values

HEX#5F40CE
RGBrgb(95, 64, 206)
HSLhsl(253, 59%, 53%)
HSVhsv(253, 69%, 81%)
CMYKcmyk(53.9%, 68.9%, 0%, 19.2%)
CIE-LABlab(38.82, 49.18, -68.98)
CIE-LCHlch(38.82, 84.72, 305.49°)
OKLaboklab(49.4% 0.0573 -0.1983)
OKLCHoklch(49.4% 0.206 286.1)
XYZxyz(17.6900, 10.5550, 59.4857)
Luminance0.1056 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40CE #AFCE40
analogous
#4068CE #5F40CE #A640CE
triadic
#5F40CE #CE5F40 #40CE5F
tetradic
#5F40CE #CE4068 #AFCE40 #40CEA6
square
#5F40CE #CE4068 #AFCE40 #40CEA6
split-complementary
#5F40CE #CEA640 #68CE40
monochromatic
#311E75 #462BA6 #5F40CE #8871DA #B1A1E7

Accessibility & contrast

On white

6.75
#5F40CE on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.11
#5F40CE on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40CE
6.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40CE#FFFFFF#000000##FFFFFF
##5F40CE1.006.753.116.75
#FFFFFF6.751.0021.001.00
#0000003.1121.001.0021.00
##FFFFFF6.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FD2
Deuteranopia (green-blind)
#0057CB
Tritanopia (blue-blind)
#306582
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5f40ce;
/* rgb */ color: rgb(95, 64, 206);
/* oklch */ color: oklch(49.4% 0.206 286.1);
Tailwind
colors: {
  custom: {
    50: '#9777de',
    500: '#5f40ce',
    950: '#000000',
  },
}
SCSS
$custom: #5f40ce;
$custom-light: #9777de;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40ce",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 206
  },
  "hsl": {
    "h": 253.099,
    "s": 59.167,
    "l": 52.941
  },
  "oklch": {
    "l": 0.49397,
    "c": 0.20641,
    "h": 286.1
  },
  "luminance": 0.10556
}

Semantic roles & 50–950 ramp

primary
#5F40CE
secondary
#C6D496
accent
#E245C0
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5F40CE

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

Preview Lab → · Contrast checker → · Palette generator →

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