#5F31B0#5F31B0

#5F31B0 is a dark, vivid violet. Relative luminance 0.078; OKLCH L 44.8% C 0.188 H 294.0°. Best body text is #FFFFFF at 8.23:1 contrast (WCAG AA passes).

Color values

HEX#5F31B0
RGBrgb(95, 49, 176)
HSLhsl(262, 56%, 44%)
HSVhsv(262, 72%, 69%)
CMYKcmyk(46%, 72.2%, 0%, 31%)
CIE-LABlab(33.49, 48.55, -60.09)
CIE-LCHlch(33.49, 77.25, 308.94°)
OKLaboklab(44.82% 0.0766 -0.1721)
OKLCHoklch(44.82% 0.188 294)
XYZxyz(13.6520, 7.7637, 41.8451)
Luminance0.0776 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31B0 #82B031
analogous
#3143B0 #5F31B0 #9F31B0
triadic
#5F31B0 #B05F31 #31B05F
tetradic
#5F31B0 #B03143 #82B031 #31B09F
square
#5F31B0 #B03143 #82B031 #31B09F
split-complementary
#5F31B0 #B09F31 #43B031
monochromatic
#2B1650 #452480 #5F31B0 #7E50CE #A180DC

Accessibility & contrast

On white

8.23
#5F31B0 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.55
#5F31B0 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31B0
8.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31B0#FFFFFF#000000##FFFFFF
##5F31B01.008.232.558.23
#FFFFFF8.231.0021.001.00
#0000002.5521.001.0021.00
##FFFFFF8.231.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5f31b0;
/* rgb */ color: rgb(95, 49, 176);
/* oklch */ color: oklch(44.8% 0.188 294.0);
Tailwind
colors: {
  custom: {
    50: '#946dc9',
    500: '#5f31b0',
    950: '#000000',
  },
}
SCSS
$custom: #5f31b0;
$custom-light: #946dc9;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31b0",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 176
  },
  "hsl": {
    "h": 261.732,
    "s": 56.444,
    "l": 44.118
  },
  "oklch": {
    "l": 0.44817,
    "c": 0.1884,
    "h": 294
  },
  "luminance": 0.07764
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5F31B0

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

Preview Lab → · Contrast checker → · Palette generator →

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