#5F40BF#5F40BF

#5F40BF is a mid, vivid violet. Relative luminance 0.099; OKLCH L 48.1% C 0.188 H 288.5°. Best body text is #FFFFFF at 7.07:1 contrast (WCAG AA passes).

Color values

HEX#5F40BF
RGBrgb(95, 64, 191)
HSLhsl(255, 50%, 50%)
HSVhsv(255, 66%, 75%)
CMYKcmyk(50.3%, 66.5%, 0%, 25.1%)
CIE-LABlab(37.59, 44.82, -62.25)
CIE-LCHlch(37.59, 76.71, 305.75°)
OKLaboklab(48.13% 0.0596 -0.1785)
OKLCHoklch(48.13% 0.188 288.5)
XYZxyz(15.9539, 9.8606, 50.3428)
Luminance0.0986 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40BF #A0BF40
analogous
#4060BF #5F40BF #9F40BF
triadic
#5F40BF #BF5F40 #40BF5F
tetradic
#5F40BF #BF4060 #A0BF40 #40BF9F
square
#5F40BF #BF4060 #A0BF40 #40BF9F
split-complementary
#5F40BF #BF9F40 #60BF40
monochromatic
#312163 #483191 #5F40BF #856ECE #AC9CDE

Accessibility & contrast

On white

7.07
#5F40BF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.97
#5F40BF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F40BF
7.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40BF#FFFFFF#000000##FFFFFF
##5F40BF1.007.072.977.07
#FFFFFF7.071.0021.001.00
#0000002.9721.001.0021.00
##FFFFFF7.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BC3
Deuteranopia (green-blind)
#0055BC
Tritanopia (blue-blind)
#3D5F7A
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5f40bf;
/* rgb */ color: rgb(95, 64, 191);
/* oklch */ color: oklch(48.1% 0.188 288.5);
Tailwind
colors: {
  custom: {
    50: '#9577d3',
    500: '#5f40bf',
    950: '#000000',
  },
}
SCSS
$custom: #5f40bf;
$custom-light: #9577d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40bf",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 191
  },
  "hsl": {
    "h": 254.646,
    "s": 49.804,
    "l": 50
  },
  "oklch": {
    "l": 0.48133,
    "c": 0.18823,
    "h": 288.5
  },
  "luminance": 0.09861
}

Semantic roles & 50–950 ramp

primary
#5F40BF
secondary
#BCCA91
accent
#D94EB7
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5F40BF

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

Preview Lab → · Contrast checker → · Palette generator →

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