#5F31AA#5F31AA

#5F31AA is a dark, vivid violet. Relative luminance 0.075; OKLCH L 44.3% C 0.181 H 295.4°. Best body text is #FFFFFF at 8.38:1 contrast (WCAG AA passes).

Color values

HEX#5F31AA
RGBrgb(95, 49, 170)
HSLhsl(263, 55%, 43%)
HSVhsv(263, 71%, 67%)
CMYKcmyk(44.1%, 71.2%, 0%, 33.3%)
CIE-LABlab(32.99, 46.93, -57.32)
CIE-LCHlch(32.99, 74.08, 309.31°)
OKLaboklab(44.31% 0.0778 -0.164)
OKLCHoklch(44.31% 0.182 295.4)
XYZxyz(13.0714, 7.5315, 38.7874)
Luminance0.0753 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31AA #7CAA31
analogous
#313FAA #5F31AA #9B31AA
triadic
#5F31AA #AA5F31 #31AA5F
tetradic
#5F31AA #AA313F #7CAA31 #31AA9B
square
#5F31AA #AA313F #7CAA31 #31AA9B
split-complementary
#5F31AA #AA9B31 #3FAA31
monochromatic
#2A164B #44237A #5F31AA #7D4DCC #A07CD9

Accessibility & contrast

On white

8.38
#5F31AA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.51
#5F31AA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31AA
8.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31AA#FFFFFF#000000##FFFFFF
##5F31AA1.008.382.518.38
#FFFFFF8.381.0021.001.00
#0000002.5121.001.0021.00
##FFFFFF8.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EAE
Deuteranopia (green-blind)
#004CA8
Tritanopia (blue-blind)
#4B4F6A
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #5f31aa;
/* rgb */ color: rgb(95, 49, 170);
/* oklch */ color: oklch(44.3% 0.181 295.4);
Tailwind
colors: {
  custom: {
    50: '#936dc4',
    500: '#5f31aa',
    950: '#000000',
  },
}
SCSS
$custom: #5f31aa;
$custom-light: #936dc4;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31aa",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 170
  },
  "hsl": {
    "h": 262.81,
    "s": 55.251,
    "l": 42.941
  },
  "oklch": {
    "l": 0.44308,
    "c": 0.1815,
    "h": 295.4
  },
  "luminance": 0.07532
}

Semantic roles & 50–950 ramp

primary
#5F31AA
secondary
#A5C275
accent
#DF49A6
background
#F9F6FC
surface
#F2ECF8
border
#CCC7D1
text
#0E0713
muted
#7E7A82

Preview Lab

Preview with #5F31AA

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

Preview Lab → · Contrast checker → · Palette generator →

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