#5F40C8#5F40C8

#5F40C8 is a mid, vivid violet. Relative luminance 0.103; OKLCH L 48.9% C 0.199 H 287.0°. Best body text is #FFFFFF at 6.88:1 contrast (WCAG AA passes).

Color values

HEX#5F40C8
RGBrgb(95, 64, 200)
HSLhsl(254, 55%, 52%)
HSVhsv(254, 68%, 78%)
CMYKcmyk(52.5%, 68%, 0%, 21.6%)
CIE-LABlab(38.32, 47.43, -66.32)
CIE-LCHlch(38.32, 81.53, 305.57°)
OKLaboklab(48.88% 0.0583 -0.1905)
OKLCHoklch(48.88% 0.199 287)
XYZxyz(16.9750, 10.2690, 55.7200)
Luminance0.1027 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40C8 #A9C840
analogous
#4065C8 #5F40C8 #A340C8
triadic
#5F40C8 #C85F40 #40C85F
tetradic
#5F40C8 #C84065 #A9C840 #40C8A3
square
#5F40C8 #C84065 #A9C840 #40C8A3
split-complementary
#5F40C8 #C8A340 #65C840
monochromatic
#32206E #472D9D #5F40C8 #8770D6 #AF9FE3

Accessibility & contrast

On white

6.88
#5F40C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.05
#5F40C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40C8
6.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40C8#FFFFFF#000000##FFFFFF
##5F40C81.006.883.056.88
#FFFFFF6.881.0021.001.00
#0000003.0521.001.0021.00
##FFFFFF6.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECC
Deuteranopia (green-blind)
#0056C5
Tritanopia (blue-blind)
#36637F
Achromatopsia (no color)
#5A5A5A

Design tokens & code

CSS
--color: #5f40c8;
/* rgb */ color: rgb(95, 64, 200);
/* oklch */ color: oklch(48.9% 0.199 287.0);
Tailwind
colors: {
  custom: {
    50: '#9677da',
    500: '#5f40c8',
    950: '#000000',
  },
}
SCSS
$custom: #5f40c8;
$custom-light: #9677da;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40c8",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 253.676,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.48884,
    "c": 0.19919,
    "h": 287
  },
  "luminance": 0.1027
}

Semantic roles & 50–950 ramp

primary
#5F40C8
secondary
#C2D094
accent
#DF49BD
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5F40C8

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

Preview Lab → · Contrast checker → · Palette generator →

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