#5F40A2#5F40A2

#5F40A2 is a mid, vivid violet. Relative luminance 0.087; OKLCH L 45.9% C 0.152 H 294.2°. Best body text is #FFFFFF at 7.66:1 contrast (WCAG AA passes).

Color values

HEX#5F40A2
RGBrgb(95, 64, 162)
HSLhsl(259, 43%, 44%)
HSVhsv(259, 60%, 64%)
CMYKcmyk(41.4%, 60.5%, 0%, 36.5%)
CIE-LABlab(35.42, 36.47, -48.57)
CIE-LCHlch(35.42, 60.74, 306.90°)
OKLaboklab(45.87% 0.0622 -0.1383)
OKLCHoklch(45.87% 0.152 294.2)
XYZxyz(13.0726, 8.7080, 35.1675)
Luminance0.0871 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40A2 #83A240
analogous
#4052A2 #5F40A2 #9040A2
triadic
#5F40A2 #A25F40 #40A25F
tetradic
#5F40A2 #A24052 #83A240 #40A290
square
#5F40A2 #A24052 #83A240 #40A290
split-complementary
#5F40A2 #A29040 #52A240
monochromatic
#2C1D4A #452F76 #5F40A2 #7E5FC0 #A18BD1

Accessibility & contrast

On white

7.66
#5F40A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.74
#5F40A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F40A2
7.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40A2#FFFFFF#000000##FFFFFF
##5F40A21.007.662.747.66
#FFFFFF7.661.0021.001.00
#0000002.7421.001.0021.00
##FFFFFF7.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054A5
Deuteranopia (green-blind)
#0C52A0
Tritanopia (blue-blind)
#4D566B
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #5f40a2;
/* rgb */ color: rgb(95, 64, 162);
/* oklch */ color: oklch(45.9% 0.152 294.2);
Tailwind
colors: {
  custom: {
    50: '#9176be',
    500: '#5f40a2',
    950: '#000000',
  },
}
SCSS
$custom: #5f40a2;
$custom-light: #9176be;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40a2",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 162
  },
  "hsl": {
    "h": 258.98,
    "s": 43.363,
    "l": 44.314
  },
  "oklch": {
    "l": 0.4587,
    "c": 0.15165,
    "h": 294.2
  },
  "luminance": 0.08708
}

Semantic roles & 50–950 ramp

primary
#5F40A2
secondary
#AABC82
accent
#D355AB
background
#F9F7FB
surface
#F2EDF7
border
#CCC8D0
text
#0D0812
muted
#7E7B81

Preview Lab

Preview with #5F40A2

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

Preview Lab → · Contrast checker → · Palette generator →

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