#5F31C8#5F31C8

#5F31C8 is a mid, highly saturated violet. Relative luminance 0.088; OKLCH L 46.9% C 0.215 H 289.2°. Best body text is #FFFFFF at 7.61:1 contrast (WCAG AA passes).

Color values

HEX#5F31C8
RGBrgb(95, 49, 200)
HSLhsl(258, 61%, 49%)
HSVhsv(258, 76%, 78%)
CMYKcmyk(52.5%, 75.5%, 0%, 21.6%)
CIE-LABlab(35.59, 55.06, -70.78)
CIE-LCHlch(35.59, 89.68, 307.88°)
OKLaboklab(46.95% 0.0708 -0.2035)
OKLCHoklch(46.95% 0.215 289.2)
XYZxyz(16.2399, 8.7989, 55.4750)
Luminance0.0880 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31C8 #9AC831
analogous
#314FC8 #5F31C8 #AB31C8
triadic
#5F31C8 #C85F31 #31C85F
tetradic
#5F31C8 #C8314F #9AC831 #31C8AB
square
#5F31C8 #C8314F #9AC831 #31C8AB
split-complementary
#5F31C8 #C8AB31 #4FC831
monochromatic
#301966 #482597 #5F31C8 #835FD8 #A990E4

Accessibility & contrast

On white

7.61
#5F31C8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.76
#5F31C8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31C8
7.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31C8#FFFFFF#000000##FFFFFF
##5F31C81.007.612.767.61
#FFFFFF7.611.0021.001.00
#0000002.7621.001.0021.00
##FFFFFF7.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057CC
Deuteranopia (green-blind)
#0050C5
Tritanopia (blue-blind)
#375B7B
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #5f31c8;
/* rgb */ color: rgb(95, 49, 200);
/* oklch */ color: oklch(46.9% 0.215 289.2);
Tailwind
colors: {
  custom: {
    50: '#976eda',
    500: '#5f31c8',
    950: '#000000',
  },
}
SCSS
$custom: #5f31c8;
$custom-light: #976eda;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31c8",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 200
  },
  "hsl": {
    "h": 258.278,
    "s": 60.643,
    "l": 48.824
  },
  "oklch": {
    "l": 0.4695,
    "c": 0.21546,
    "h": 289.2
  },
  "luminance": 0.088
}

Semantic roles & 50–950 ramp

primary
#5F31C8
secondary
#B8CE86
accent
#E444B3
background
#F9F6FD
surface
#F2ECFB
border
#CCC7D4
text
#0F0715
muted
#7E7A83

Preview Lab

Preview with #5F31C8

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

Preview Lab → · Contrast checker → · Palette generator →

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