#5F40CB#5F40CB

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

Color values

HEX#5F40CB
RGBrgb(95, 64, 203)
HSLhsl(253, 57%, 52%)
HSVhsv(253, 68%, 80%)
CMYKcmyk(53.2%, 68.5%, 0%, 20.4%)
CIE-LABlab(38.57, 48.31, -67.65)
CIE-LCHlch(38.57, 83.13, 305.53°)
OKLaboklab(49.14% 0.0578 -0.1944)
OKLCHoklch(49.14% 0.203 286.6)
XYZxyz(17.3290, 10.4106, 57.5847)
Luminance0.1041 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40CB #ACCB40
analogous
#4067CB #5F40CB #A440CB
triadic
#5F40CB #CB5F40 #40CB5F
tetradic
#5F40CB #CB4067 #ACCB40 #40CBA4
square
#5F40CB #CB4067 #ACCB40 #40CBA4
split-complementary
#5F40CB #CBA440 #67CB40
monochromatic
#311F72 #462CA2 #5F40CB #8770D8 #B0A0E5

Accessibility & contrast

On white

6.81
#5F40CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.08
#5F40CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40CB
6.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40CB#FFFFFF#000000##FFFFFF
##5F40CB1.006.813.086.81
#FFFFFF6.811.0021.001.00
#0000003.0821.001.0021.00
##FFFFFF6.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECF
Deuteranopia (green-blind)
#0057C8
Tritanopia (blue-blind)
#336480
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5f40cb;
/* rgb */ color: rgb(95, 64, 203);
/* oklch */ color: oklch(49.1% 0.203 286.6);
Tailwind
colors: {
  custom: {
    50: '#9677dc',
    500: '#5f40cb',
    950: '#000000',
  },
}
SCSS
$custom: #5f40cb;
$custom-light: #9677dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40cb",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 253.381,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.49139,
    "c": 0.20282,
    "h": 286.6
  },
  "luminance": 0.10411
}

Semantic roles & 50–950 ramp

primary
#5F40CB
secondary
#C4D295
accent
#E047BE
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5F40CB

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

Preview Lab → · Contrast checker → · Palette generator →

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