#5F31C2#5F31C2

#5F31C2 is a mid, highly saturated violet. Relative luminance 0.085; OKLCH L 46.4% C 0.209 H 290.3°. Best body text is #FFFFFF at 7.76:1 contrast (WCAG AA passes).

Color values

HEX#5F31C2
RGBrgb(95, 49, 194)
HSLhsl(259, 60%, 48%)
HSVhsv(259, 75%, 76%)
CMYKcmyk(51%, 74.7%, 0%, 23.9%)
CIE-LABlab(35.05, 53.43, -68.17)
CIE-LCHlch(35.05, 86.61, 308.09°)
OKLaboklab(46.4% 0.0724 -0.1958)
OKLCHoklch(46.4% 0.209 290.3)
XYZxyz(15.5524, 8.5239, 51.8543)
Luminance0.0853 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31C2 #94C231
analogous
#314CC2 #5F31C2 #A731C2
triadic
#5F31C2 #C25F31 #31C25F
tetradic
#5F31C2 #C2314C #94C231 #31C2A7
square
#5F31C2 #C2314C #94C231 #31C2A7
split-complementary
#5F31C2 #C2A731 #4CC231
monochromatic
#2F1860 #472591 #5F31C2 #825BD6 #A78CE2

Accessibility & contrast

On white

7.76
#5F31C2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.71
#5F31C2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31C2
7.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31C2#FFFFFF#000000##FFFFFF
##5F31C21.007.762.717.76
#FFFFFF7.761.0021.001.00
#0000002.7121.001.0021.00
##FFFFFF7.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055C6
Deuteranopia (green-blind)
#004FBF
Tritanopia (blue-blind)
#3C5977
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #5f31c2;
/* rgb */ color: rgb(95, 49, 194);
/* oklch */ color: oklch(46.4% 0.209 290.3);
Tailwind
colors: {
  custom: {
    50: '#966ed6',
    500: '#5f31c2',
    950: '#000000',
  },
}
SCSS
$custom: #5f31c2;
$custom-light: #966ed6;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31c2",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 194
  },
  "hsl": {
    "h": 259.034,
    "s": 59.671,
    "l": 47.647
  },
  "oklch": {
    "l": 0.46403,
    "c": 0.20877,
    "h": 290.3
  },
  "luminance": 0.08525
}

Semantic roles & 50–950 ramp

primary
#5F31C2
secondary
#B5CC83
accent
#E345B1
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0F0714
muted
#7E7A83

Preview Lab

Preview with #5F31C2

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

Preview Lab → · Contrast checker → · Palette generator →

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