#5F40CC#5F40CC

#5F40CC is a mid, highly saturated violet. Relative luminance 0.105; OKLCH L 49.2% C 0.204 H 286.4°. Best body text is #FFFFFF at 6.79:1 contrast (WCAG AA passes).

Color values

HEX#5F40CC
RGBrgb(95, 64, 204)
HSLhsl(253, 58%, 53%)
HSVhsv(253, 69%, 80%)
CMYKcmyk(53.4%, 68.6%, 0%, 20%)
CIE-LABlab(38.65, 48.60, -68.10)
CIE-LCHlch(38.65, 83.66, 305.51°)
OKLaboklab(49.23% 0.0577 -0.1957)
OKLCHoklch(49.23% 0.204 286.4)
XYZxyz(17.4485, 10.4584, 58.2143)
Luminance0.1046 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40CC #ADCC40
analogous
#4067CC #5F40CC #A540CC
triadic
#5F40CC #CC5F40 #40CC5F
tetradic
#5F40CC #CC4067 #ADCC40 #40CCA5
square
#5F40CC #CC4067 #ADCC40 #40CCA5
split-complementary
#5F40CC #CCA540 #67CC40
monochromatic
#311F73 #462CA3 #5F40CC #8770D9 #B0A1E6

Accessibility & contrast

On white

6.79
#5F40CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.09
#5F40CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40CC
6.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40CC#FFFFFF#000000##FFFFFF
##5F40CC1.006.793.096.79
#FFFFFF6.791.0021.001.00
#0000003.0921.001.0021.00
##FFFFFF6.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FD0
Deuteranopia (green-blind)
#0057C9
Tritanopia (blue-blind)
#326481
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5f40cc;
/* rgb */ color: rgb(95, 64, 204);
/* oklch */ color: oklch(49.2% 0.204 286.4);
Tailwind
colors: {
  custom: {
    50: '#9777dd',
    500: '#5f40cc',
    950: '#000000',
  },
}
SCSS
$custom: #5f40cc;
$custom-light: #9777dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40cc",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 204
  },
  "hsl": {
    "h": 253.286,
    "s": 57.851,
    "l": 52.549
  },
  "oklch": {
    "l": 0.49225,
    "c": 0.20401,
    "h": 286.4
  },
  "luminance": 0.10459
}

Semantic roles & 50–950 ramp

primary
#5F40CC
secondary
#C5D295
accent
#E147BF
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5F40CC

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

Preview Lab → · Contrast checker → · Palette generator →

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