#5F40AF#5F40AF

#5F40AF is a mid, vivid violet. Relative luminance 0.092; OKLCH L 46.9% C 0.168 H 291.4°. Best body text is #FFFFFF at 7.40:1 contrast (WCAG AA passes).

Color values

HEX#5F40AF
RGBrgb(95, 64, 175)
HSLhsl(257, 46%, 47%)
HSVhsv(257, 63%, 69%)
CMYKcmyk(45.7%, 63.4%, 0%, 31.4%)
CIE-LABlab(36.36, 40.19, -54.82)
CIE-LCHlch(36.36, 67.97, 306.24°)
OKLaboklab(46.85% 0.0614 -0.1567)
OKLCHoklch(46.85% 0.168 291.4)
XYZxyz(14.2884, 9.1944, 41.5710)
Luminance0.0920 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40AF #90AF40
analogous
#4058AF #5F40AF #9740AF
triadic
#5F40AF #AF5F40 #40AF5F
tetradic
#5F40AF #AF4058 #90AF40 #40AF97
square
#5F40AF #AF4058 #90AF40 #40AF97
split-complementary
#5F40AF #AF9740 #58AF40
monochromatic
#2E1F55 #473082 #5F40AF #8165C7 #A592D7

Accessibility & contrast

On white

7.40
#5F40AF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.84
#5F40AF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F40AF
7.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40AF#FFFFFF#000000##FFFFFF
##5F40AF1.007.402.847.40
#FFFFFF7.401.0021.001.00
#0000002.8421.001.0021.00
##FFFFFF7.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057B3
Deuteranopia (green-blind)
#0053AD
Tritanopia (blue-blind)
#475A71
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #5f40af;
/* rgb */ color: rgb(95, 64, 175);
/* oklch */ color: oklch(46.9% 0.168 291.4);
Tailwind
colors: {
  custom: {
    50: '#9376c8',
    500: '#5f40af',
    950: '#000000',
  },
}
SCSS
$custom: #5f40af;
$custom-light: #9376c8;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40af",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 175
  },
  "hsl": {
    "h": 256.757,
    "s": 46.444,
    "l": 46.863
  },
  "oklch": {
    "l": 0.46852,
    "c": 0.16829,
    "h": 291.4
  },
  "luminance": 0.09195
}

Semantic roles & 50–950 ramp

primary
#5F40AF
secondary
#B2C388
accent
#D652B1
background
#F9F7FC
surface
#F2EDF8
border
#CCC8D1
text
#0E0913
muted
#7E7B82

Preview Lab

Preview with #5F40AF

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

Preview Lab → · Contrast checker → · Palette generator →

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