#5F40BC#5F40BC

#5F40BC is a mid, vivid violet. Relative luminance 0.097; OKLCH L 47.9% C 0.185 H 289.0°. Best body text is #FFFFFF at 7.13:1 contrast (WCAG AA passes).

Color values

HEX#5F40BC
RGBrgb(95, 64, 188)
HSLhsl(255, 49%, 49%)
HSVhsv(255, 66%, 74%)
CMYKcmyk(49.5%, 66%, 0%, 26.3%)
CIE-LABlab(37.35, 43.95, -60.88)
CIE-LCHlch(37.35, 75.08, 305.82°)
OKLaboklab(47.89% 0.06 -0.1745)
OKLCHoklch(47.89% 0.185 289)
XYZxyz(15.6272, 9.7299, 48.6218)
Luminance0.0973 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40BC #9DBC40
analogous
#405FBC #5F40BC #9D40BC
triadic
#5F40BC #BC5F40 #40BC5F
tetradic
#5F40BC #BC405F #9DBC40 #40BC9D
square
#5F40BC #BC405F #9DBC40 #40BC9D
split-complementary
#5F40BC #BC9D40 #5FBC40
monochromatic
#312161 #48308E #5F40BC #846CCD #AB9ADD

Accessibility & contrast

On white

7.13
#5F40BC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.95
#5F40BC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F40BC
7.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40BC#FFFFFF#000000##FFFFFF
##5F40BC1.007.132.957.13
#FFFFFF7.131.0021.001.00
#0000002.9521.001.0021.00
##FFFFFF7.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC0
Deuteranopia (green-blind)
#0055BA
Tritanopia (blue-blind)
#3F5E78
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5f40bc;
/* rgb */ color: rgb(95, 64, 188);
/* oklch */ color: oklch(47.9% 0.185 289.0);
Tailwind
colors: {
  custom: {
    50: '#9477d1',
    500: '#5f40bc',
    950: '#000000',
  },
}
SCSS
$custom: #5f40bc;
$custom-light: #9477d1;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40bc",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 188
  },
  "hsl": {
    "h": 255,
    "s": 49.206,
    "l": 49.412
  },
  "oklch": {
    "l": 0.47887,
    "c": 0.18454,
    "h": 289
  },
  "luminance": 0.09731
}

Semantic roles & 50–950 ramp

primary
#5F40BC
secondary
#BAC98F
accent
#D94FB6
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5F40BC

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

Preview Lab → · Contrast checker → · Palette generator →

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