#5F40BA#5F40BA

#5F40BA is a mid, vivid violet. Relative luminance 0.096; OKLCH L 47.7% C 0.182 H 289.3°. Best body text is #FFFFFF at 7.17:1 contrast (WCAG AA passes).

Color values

HEX#5F40BA
RGBrgb(95, 64, 186)
HSLhsl(255, 49%, 49%)
HSVhsv(255, 66%, 73%)
CMYKcmyk(48.9%, 65.6%, 0%, 27.1%)
CIE-LABlab(37.20, 43.37, -59.96)
CIE-LCHlch(37.20, 74.00, 305.88°)
OKLaboklab(47.73% 0.0603 -0.1718)
OKLCHoklch(47.73% 0.182 289.3)
XYZxyz(15.4131, 9.6442, 47.4943)
Luminance0.0964 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40BA #9BBA40
analogous
#405EBA #5F40BA #9C40BA
triadic
#5F40BA #BA5F40 #40BA5F
tetradic
#5F40BA #BA405E #9BBA40 #40BA9C
square
#5F40BA #BA405E #9BBA40 #40BA9C
split-complementary
#5F40BA #BA9C40 #5EBA40
monochromatic
#30215F #48308C #5F40BA #846BCC #AA99DC

Accessibility & contrast

On white

7.17
#5F40BA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.93
#5F40BA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F40BA
7.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40BA#FFFFFF#000000##FFFFFF
##5F40BA1.007.172.937.17
#FFFFFF7.171.0021.001.00
#0000002.9321.001.0021.00
##FFFFFF7.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ABE
Deuteranopia (green-blind)
#0055B8
Tritanopia (blue-blind)
#405E77
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #5f40ba;
/* rgb */ color: rgb(95, 64, 186);
/* oklch */ color: oklch(47.7% 0.182 289.3);
Tailwind
colors: {
  custom: {
    50: '#9477d0',
    500: '#5f40ba',
    950: '#000000',
  },
}
SCSS
$custom: #5f40ba;
$custom-light: #9477d0;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40ba",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 186
  },
  "hsl": {
    "h": 255.246,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.47725,
    "c": 0.18206,
    "h": 289.3
  },
  "luminance": 0.09645
}

Semantic roles & 50–950 ramp

primary
#5F40BA
secondary
#B9C88E
accent
#D84FB6
background
#F9F7FC
surface
#F2EDF9
border
#CCC8D2
text
#0E0914
muted
#7E7B82

Preview Lab

Preview with #5F40BA

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

Preview Lab → · Contrast checker → · Palette generator →

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