#5F31B1#5F31B1

#5F31B1 is a dark, vivid violet. Relative luminance 0.078; OKLCH L 44.9% C 0.190 H 293.8°. Best body text is #FFFFFF at 8.20:1 contrast (WCAG AA passes).

Color values

HEX#5F31B1
RGBrgb(95, 49, 177)
HSLhsl(262, 57%, 44%)
HSVhsv(262, 72%, 69%)
CMYKcmyk(46.3%, 72.3%, 0%, 30.6%)
CIE-LABlab(33.57, 48.82, -60.55)
CIE-LCHlch(33.57, 77.78, 308.88°)
OKLaboklab(44.9% 0.0764 -0.1735)
OKLCHoklch(44.9% 0.19 293.8)
XYZxyz(13.7513, 7.8034, 42.3681)
Luminance0.0780 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31B1 #83B131
analogous
#3143B1 #5F31B1 #9F31B1
triadic
#5F31B1 #B15F31 #31B15F
tetradic
#5F31B1 #B13143 #83B131 #31B19F
square
#5F31B1 #B13143 #83B131 #31B19F
split-complementary
#5F31B1 #B19F31 #43B131
monochromatic
#2C1651 #452481 #5F31B1 #7E51CF #A180DC

Accessibility & contrast

On white

8.20
#5F31B1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.56
#5F31B1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31B1
8.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31B1#FFFFFF#000000##FFFFFF
##5F31B11.008.202.568.20
#FFFFFF8.201.0021.001.00
#0000002.5621.001.0021.00
##FFFFFF8.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050B5
Deuteranopia (green-blind)
#004DAE
Tritanopia (blue-blind)
#47526E
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #5f31b1;
/* rgb */ color: rgb(95, 49, 177);
/* oklch */ color: oklch(44.9% 0.190 293.8);
Tailwind
colors: {
  custom: {
    50: '#946dc9',
    500: '#5f31b1',
    950: '#000000',
  },
}
SCSS
$custom: #5f31b1;
$custom-light: #946dc9;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31b1",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 177
  },
  "hsl": {
    "h": 261.563,
    "s": 56.637,
    "l": 44.314
  },
  "oklch": {
    "l": 0.44903,
    "c": 0.18954,
    "h": 293.8
  },
  "luminance": 0.07804
}

Semantic roles & 50–950 ramp

primary
#5F31B1
secondary
#AAC579
accent
#E048A9
background
#F9F6FC
surface
#F2ECF8
border
#CCC7D1
text
#0E0713
muted
#7E7A82

Preview Lab

Preview with #5F31B1

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

Preview Lab → · Contrast checker → · Palette generator →

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