#5F40BB#5F40BB

#5F40BB is a mid, vivid violet. Relative luminance 0.097; OKLCH L 47.8% C 0.183 H 289.1°. Best body text is #FFFFFF at 7.15:1 contrast (WCAG AA passes).

Color values

HEX#5F40BB
RGBrgb(95, 64, 187)
HSLhsl(255, 49%, 49%)
HSVhsv(255, 66%, 73%)
CMYKcmyk(49.2%, 65.8%, 0%, 26.7%)
CIE-LABlab(37.27, 43.66, -60.42)
CIE-LCHlch(37.27, 74.54, 305.85°)
OKLaboklab(47.81% 0.0601 -0.1732)
OKLCHoklch(47.81% 0.183 289.1)
XYZxyz(15.5198, 9.6869, 48.0561)
Luminance0.0969 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40BB #9CBB40
analogous
#405FBB #5F40BB #9D40BB
triadic
#5F40BB #BB5F40 #40BB5F
tetradic
#5F40BB #BB405F #9CBB40 #40BB9D
square
#5F40BB #BB405F #9CBB40 #40BB9D
split-complementary
#5F40BB #BB9D40 #5FBB40
monochromatic
#312160 #48308D #5F40BB #846CCD #AA99DC

Accessibility & contrast

On white

7.15
#5F40BB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.94
#5F40BB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F40BB
7.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40BB#FFFFFF#000000##FFFFFF
##5F40BB1.007.152.947.15
#FFFFFF7.151.0021.001.00
#0000002.9421.001.0021.00
##FFFFFF7.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ABF
Deuteranopia (green-blind)
#0055B9
Tritanopia (blue-blind)
#405E78
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5f40bb;
/* rgb */ color: rgb(95, 64, 187);
/* oklch */ color: oklch(47.8% 0.183 289.1);
Tailwind
colors: {
  custom: {
    50: '#9477d0',
    500: '#5f40bb',
    950: '#000000',
  },
}
SCSS
$custom: #5f40bb;
$custom-light: #9477d0;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40bb",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 187
  },
  "hsl": {
    "h": 255.122,
    "s": 49.004,
    "l": 49.216
  },
  "oklch": {
    "l": 0.47806,
    "c": 0.1833,
    "h": 289.1
  },
  "luminance": 0.09688
}

Semantic roles & 50–950 ramp

primary
#5F40BB
secondary
#BAC88F
accent
#D94FB6
background
#F9F7FC
surface
#F2EDF9
border
#CCC8D2
text
#0E0914
muted
#7E7B82

Preview Lab

Preview with #5F40BB

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

Preview Lab → · Contrast checker → · Palette generator →

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