#5F40DC#5F40DC

#5F40DC is a mid, highly saturated violet. Relative luminance 0.113; OKLCH L 50.6% C 0.223 H 284.2°. Best body text is #FFFFFF at 6.45:1 contrast (WCAG AA passes).

Color values

HEX#5F40DC
RGBrgb(95, 64, 220)
HSLhsl(252, 69%, 56%)
HSVhsv(252, 71%, 86%)
CMYKcmyk(56.8%, 70.9%, 0%, 13.7%)
CIE-LABlab(40.02, 53.24, -75.07)
CIE-LCHlch(40.02, 92.03, 305.35°)
OKLaboklab(50.63% 0.0547 -0.2161)
OKLCHoklch(50.63% 0.223 284.2)
XYZxyz(19.4670, 11.2658, 68.8450)
Luminance0.1127 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40DC #BDDC40
analogous
#406FDC #5F40DC #AD40DC
triadic
#5F40DC #DC5F40 #40DC5F
tetradic
#5F40DC #DC406F #BDDC40 #40DCAD
square
#5F40DC #DC406F #BDDC40 #40DCAD
split-complementary
#5F40DC #DCAD40 #6FDC40
monochromatic
#2F1989 #4123BC #5F40DC #8A74E5 #B6A7EF

Accessibility & contrast

On white

6.45
#5F40DC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.25
#5F40DC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40DC
6.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40DC#FFFFFF#000000##FFFFFF
##5F40DC1.006.453.256.45
#FFFFFF6.451.0021.001.00
#0000003.2521.001.0021.00
##FFFFFF6.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063E1
Deuteranopia (green-blind)
#0059D9
Tritanopia (blue-blind)
#1C6A8A
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5f40dc;
/* rgb */ color: rgb(95, 64, 220);
/* oklch */ color: oklch(50.6% 0.223 284.2);
Tailwind
colors: {
  custom: {
    50: '#9978e8',
    500: '#5f40dc',
    950: '#000000',
  },
}
SCSS
$custom: #5f40dc;
$custom-light: #9978e8;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40dc",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 220
  },
  "hsl": {
    "h": 251.923,
    "s": 69.027,
    "l": 55.686
  },
  "oklch": {
    "l": 0.50625,
    "c": 0.22295,
    "h": 284.2
  },
  "luminance": 0.11267
}

Semantic roles & 50–950 ramp

primary
#5F40DC
secondary
#CFDC9B
accent
#EC3CC9
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F40DC

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

Preview Lab → · Contrast checker → · Palette generator →

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