#5F40D2#5F40D2

#5F40D2 is a mid, highly saturated violet. Relative luminance 0.108; OKLCH L 49.7% C 0.211 H 285.5°. Best body text is #FFFFFF at 6.67:1 contrast (WCAG AA passes).

Color values

HEX#5F40D2
RGBrgb(95, 64, 210)
HSLhsl(253, 62%, 54%)
HSVhsv(253, 70%, 82%)
CMYKcmyk(54.8%, 69.5%, 0%, 17.6%)
CIE-LABlab(39.16, 50.34, -70.74)
CIE-LCHlch(39.16, 86.82, 305.44°)
OKLaboklab(49.74% 0.0566 -0.2034)
OKLCHoklch(49.74% 0.211 285.5)
XYZxyz(18.1821, 10.7518, 62.0775)
Luminance0.1075 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40D2 #B3D240
analogous
#406AD2 #5F40D2 #A840D2
triadic
#5F40D2 #D25F40 #40D25F
tetradic
#5F40D2 #D2406A #B3D240 #40D2A8
square
#5F40D2 #D2406A #B3D240 #40D2A8
split-complementary
#5F40D2 #D2A840 #6AD240
monochromatic
#311D7B #4529AC #5F40D2 #8872DE #B2A3E9

Accessibility & contrast

On white

6.67
#5F40D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.15
#5F40D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40D2
6.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40D2#FFFFFF#000000##FFFFFF
##5F40D21.006.673.156.67
#FFFFFF6.671.0021.001.00
#0000003.1521.001.0021.00
##FFFFFF6.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060D6
Deuteranopia (green-blind)
#0058CF
Tritanopia (blue-blind)
#2B6684
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #5f40d2;
/* rgb */ color: rgb(95, 64, 210);
/* oklch */ color: oklch(49.7% 0.211 285.5);
Tailwind
colors: {
  custom: {
    50: '#9777e1',
    500: '#5f40d2',
    950: '#000000',
  },
}
SCSS
$custom: #5f40d2;
$custom-light: #9777e1;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40d2",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 252.74,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.49743,
    "c": 0.21117,
    "h": 285.5
  },
  "luminance": 0.10753
}

Semantic roles & 50–950 ramp

primary
#5F40D2
secondary
#C9D698
accent
#E543C3
background
#FAF7FD
surface
#F3EDFB
border
#CDC8D4
text
#0F0915
muted
#7F7B83

Preview Lab

Preview with #5F40D2

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

Preview Lab → · Contrast checker → · Palette generator →

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