#5F40BE#5F40BE

#5F40BE is a mid, vivid violet. Relative luminance 0.098; OKLCH L 48.1% C 0.187 H 288.6°. Best body text is #FFFFFF at 7.09:1 contrast (WCAG AA passes).

Color values

HEX#5F40BE
RGBrgb(95, 64, 190)
HSLhsl(255, 50%, 50%)
HSVhsv(255, 66%, 75%)
CMYKcmyk(50%, 66.3%, 0%, 25.5%)
CIE-LABlab(37.51, 44.53, -61.80)
CIE-LCHlch(37.51, 76.17, 305.77°)
OKLaboklab(48.05% 0.0598 -0.1772)
OKLCHoklch(48.05% 0.187 288.6)
XYZxyz(15.8443, 9.8167, 49.7652)
Luminance0.0982 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40BE #9FBE40
analogous
#4060BE #5F40BE #9E40BE
triadic
#5F40BE #BE5F40 #40BE5F
tetradic
#5F40BE #BE4060 #9FBE40 #40BE9E
square
#5F40BE #BE4060 #9FBE40 #40BE9E
split-complementary
#5F40BE #BE9E40 #60BE40
monochromatic
#312162 #483190 #5F40BE #856DCE #AB9BDD

Accessibility & contrast

On white

7.09
#5F40BE on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.96
#5F40BE on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F40BE
7.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40BE#FFFFFF#000000##FFFFFF
##5F40BE1.007.092.967.09
#FFFFFF7.091.0021.001.00
#0000002.9621.001.0021.00
##FFFFFF7.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BC2
Deuteranopia (green-blind)
#0055BB
Tritanopia (blue-blind)
#3E5F79
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5f40be;
/* rgb */ color: rgb(95, 64, 190);
/* oklch */ color: oklch(48.1% 0.187 288.6);
Tailwind
colors: {
  custom: {
    50: '#9577d3',
    500: '#5f40be',
    950: '#000000',
  },
}
SCSS
$custom: #5f40be;
$custom-light: #9577d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40be",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 190
  },
  "hsl": {
    "h": 254.762,
    "s": 49.606,
    "l": 49.804
  },
  "oklch": {
    "l": 0.48051,
    "c": 0.187,
    "h": 288.6
  },
  "luminance": 0.09817
}

Semantic roles & 50–950 ramp

primary
#5F40BE
secondary
#BBC990
accent
#D94FB7
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5F40BE

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

Preview Lab → · Contrast checker → · Palette generator →

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