#5F40DF#5F40DF

#5F40DF is a mid, highly saturated violet. Relative luminance 0.114; OKLCH L 50.9% C 0.226 H 283.8°. Best body text is #FFFFFF at 6.39:1 contrast (WCAG AA passes).

Color values

HEX#5F40DF
RGBrgb(95, 64, 223)
HSLhsl(252, 71%, 56%)
HSVhsv(252, 71%, 87%)
CMYKcmyk(57.4%, 71.3%, 0%, 12.5%)
CIE-LABlab(40.29, 54.11, -76.35)
CIE-LCHlch(40.29, 93.58, 305.33°)
OKLaboklab(50.89% 0.0541 -0.2199)
OKLCHoklch(50.89% 0.226 283.8)
XYZxyz(19.8679, 11.4261, 70.9563)
Luminance0.1143 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40DF #C0DF40
analogous
#4071DF #5F40DF #AF40DF
triadic
#5F40DF #DF5F40 #40DF5F
tetradic
#5F40DF #DF4071 #C0DF40 #40DFAF
square
#5F40DF #DF4071 #C0DF40 #40DFAF
split-complementary
#5F40DF #DFAF40 #71DF40
monochromatic
#2F188D #4020C1 #5F40DF #8B74E8 #B7A9F1

Accessibility & contrast

On white

6.39
#5F40DF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.29
#5F40DF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40DF
6.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40DF#FFFFFF#000000##FFFFFF
##5F40DF1.006.393.296.39
#FFFFFF6.391.0021.001.00
#0000003.2921.001.0021.00
##FFFFFF6.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064E4
Deuteranopia (green-blind)
#005ADC
Tritanopia (blue-blind)
#166B8C
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #5f40df;
/* rgb */ color: rgb(95, 64, 223);
/* oklch */ color: oklch(50.9% 0.226 283.8);
Tailwind
colors: {
  custom: {
    50: '#9978ea',
    500: '#5f40df',
    950: '#000000',
  },
}
SCSS
$custom: #5f40df;
$custom-light: #9978ea;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40df",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 223
  },
  "hsl": {
    "h": 251.698,
    "s": 71.3,
    "l": 56.275
  },
  "oklch": {
    "l": 0.50893,
    "c": 0.22644,
    "h": 283.8
  },
  "luminance": 0.11427
}

Semantic roles & 50–950 ramp

primary
#5F40DF
secondary
#D1DE9D
accent
#EE3ACB
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F40DF

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

Preview Lab → · Contrast checker → · Palette generator →

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