#5F40CD#5F40CD

#5F40CD is a mid, highly saturated violet. Relative luminance 0.105; OKLCH L 49.3% C 0.205 H 286.3°. Best body text is #FFFFFF at 6.77:1 contrast (WCAG AA passes).

Color values

HEX#5F40CD
RGBrgb(95, 64, 205)
HSLhsl(253, 59%, 53%)
HSVhsv(253, 69%, 80%)
CMYKcmyk(53.7%, 68.8%, 0%, 19.6%)
CIE-LABlab(38.74, 48.89, -68.54)
CIE-LCHlch(38.74, 84.19, 305.50°)
OKLaboklab(49.31% 0.0575 -0.197)
OKLCHoklch(49.31% 0.205 286.3)
XYZxyz(17.5689, 10.5065, 58.8480)
Luminance0.1051 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40CD #AECD40
analogous
#4068CD #5F40CD #A540CD
triadic
#5F40CD #CD5F40 #40CD5F
tetradic
#5F40CD #CD4068 #AECD40 #40CDA5
square
#5F40CD #CD4068 #AECD40 #40CDA5
split-complementary
#5F40CD #CDA540 #68CD40
monochromatic
#311E74 #462BA5 #5F40CD #8871DA #B0A1E6

Accessibility & contrast

On white

6.77
#5F40CD on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.10
#5F40CD on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40CD
6.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40CD#FFFFFF#000000##FFFFFF
##5F40CD1.006.773.106.77
#FFFFFF6.771.0021.001.00
#0000003.1021.001.0021.00
##FFFFFF6.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FD1
Deuteranopia (green-blind)
#0057CA
Tritanopia (blue-blind)
#316582
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5f40cd;
/* rgb */ color: rgb(95, 64, 205);
/* oklch */ color: oklch(49.3% 0.205 286.3);
Tailwind
colors: {
  custom: {
    50: '#9777dd',
    500: '#5f40cd',
    950: '#000000',
  },
}
SCSS
$custom: #5f40cd;
$custom-light: #9777dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40cd",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 205
  },
  "hsl": {
    "h": 253.191,
    "s": 58.506,
    "l": 52.745
  },
  "oklch": {
    "l": 0.49311,
    "c": 0.20521,
    "h": 286.3
  },
  "luminance": 0.10507
}

Semantic roles & 50–950 ramp

primary
#5F40CD
secondary
#C6D396
accent
#E246BF
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5F40CD

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

Preview Lab → · Contrast checker → · Palette generator →

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