#5F40CF#5F40CF

#5F40CF is a mid, highly saturated violet. Relative luminance 0.106; OKLCH L 49.5% C 0.208 H 286.0°. Best body text is #FFFFFF at 6.73:1 contrast (WCAG AA passes).

Color values

HEX#5F40CF
RGBrgb(95, 64, 207)
HSLhsl(253, 60%, 53%)
HSVhsv(253, 69%, 81%)
CMYKcmyk(54.1%, 69.1%, 0%, 18.8%)
CIE-LABlab(38.90, 49.47, -69.42)
CIE-LCHlch(38.90, 85.24, 305.47°)
OKLaboklab(49.48% 0.0571 -0.1996)
OKLCHoklch(49.48% 0.208 286)
XYZxyz(17.8118, 10.6037, 60.1276)
Luminance0.1061 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40CF #B0CF40
analogous
#4068CF #5F40CF #A640CF
triadic
#5F40CF #CF5F40 #40CF5F
tetradic
#5F40CF #CF4068 #B0CF40 #40CFA6
square
#5F40CF #CF4068 #B0CF40 #40CFA6
split-complementary
#5F40CF #CFA640 #68CF40
monochromatic
#311E77 #452AA8 #5F40CF #8871DB #B1A2E8

Accessibility & contrast

On white

6.73
#5F40CF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.12
#5F40CF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40CF
6.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40CF#FFFFFF#000000##FFFFFF
##5F40CF1.006.733.126.73
#FFFFFF6.731.0021.001.00
#0000003.1221.001.0021.00
##FFFFFF6.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FD3
Deuteranopia (green-blind)
#0057CC
Tritanopia (blue-blind)
#2F6583
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #5f40cf;
/* rgb */ color: rgb(95, 64, 207);
/* oklch */ color: oklch(49.5% 0.208 286.0);
Tailwind
colors: {
  custom: {
    50: '#9777df',
    500: '#5f40cf',
    950: '#000000',
  },
}
SCSS
$custom: #5f40cf;
$custom-light: #9777df;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40cf",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 207
  },
  "hsl": {
    "h": 253.007,
    "s": 59.833,
    "l": 53.137
  },
  "oklch": {
    "l": 0.49483,
    "c": 0.2076,
    "h": 286
  },
  "luminance": 0.10605
}

Semantic roles & 50–950 ramp

primary
#5F40CF
secondary
#C7D497
accent
#E345C1
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5F40CF

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

Preview Lab → · Contrast checker → · Palette generator →

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