#5F40CA#5F40CA

#5F40CA is a mid, highly saturated violet. Relative luminance 0.104; OKLCH L 49.1% C 0.202 H 286.7°. Best body text is #FFFFFF at 6.83:1 contrast (WCAG AA passes).

Color values

HEX#5F40CA
RGBrgb(95, 64, 202)
HSLhsl(253, 57%, 52%)
HSVhsv(253, 68%, 79%)
CMYKcmyk(53%, 68.3%, 0%, 20.8%)
CIE-LABlab(38.49, 48.01, -67.21)
CIE-LCHlch(38.49, 82.60, 305.54°)
OKLaboklab(49.05% 0.058 -0.1931)
OKLCHoklch(49.05% 0.202 286.7)
XYZxyz(17.2102, 10.3631, 56.9591)
Luminance0.1036 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40CA #ABCA40
analogous
#4066CA #5F40CA #A440CA
triadic
#5F40CA #CA5F40 #40CA5F
tetradic
#5F40CA #CA4066 #ABCA40 #40CAA4
square
#5F40CA #CA4066 #ABCA40 #40CAA4
split-complementary
#5F40CA #CAA440 #66CA40
monochromatic
#311F70 #472CA0 #5F40CA #8770D7 #AFA0E5

Accessibility & contrast

On white

6.83
#5F40CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.07
#5F40CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40CA
6.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40CA#FFFFFF#000000##FFFFFF
##5F40CA1.006.833.076.83
#FFFFFF6.831.0021.001.00
#0000003.0721.001.0021.00
##FFFFFF6.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECE
Deuteranopia (green-blind)
#0057C7
Tritanopia (blue-blind)
#346380
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5f40ca;
/* rgb */ color: rgb(95, 64, 202);
/* oklch */ color: oklch(49.1% 0.202 286.7);
Tailwind
colors: {
  custom: {
    50: '#9677db',
    500: '#5f40ca',
    950: '#000000',
  },
}
SCSS
$custom: #5f40ca;
$custom-light: #9677db;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40ca",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 202
  },
  "hsl": {
    "h": 253.478,
    "s": 56.557,
    "l": 52.157
  },
  "oklch": {
    "l": 0.49054,
    "c": 0.20161,
    "h": 286.7
  },
  "luminance": 0.10364
}

Semantic roles & 50–950 ramp

primary
#5F40CA
secondary
#C3D195
accent
#E048BE
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5F40CA

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

Preview Lab → · Contrast checker → · Palette generator →

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