#5F31BE#5F31BE

#5F31BE is a mid, highly saturated violet. Relative luminance 0.083; OKLCH L 46.0% C 0.204 H 291.0°. Best body text is #FFFFFF at 7.87:1 contrast (WCAG AA passes).

Color values

HEX#5F31BE
RGBrgb(95, 49, 190)
HSLhsl(260, 59%, 47%)
HSVhsv(260, 74%, 75%)
CMYKcmyk(50%, 74.2%, 0%, 25.5%)
CIE-LABlab(34.69, 52.34, -66.40)
CIE-LCHlch(34.69, 84.55, 308.25°)
OKLaboklab(46.04% 0.0734 -0.1907)
OKLCHoklch(46.04% 0.204 291)
XYZxyz(15.1092, 8.3466, 49.5202)
Luminance0.0835 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31BE #90BE31
analogous
#314ABE #5F31BE #A531BE
triadic
#5F31BE #BE5F31 #31BE5F
tetradic
#5F31BE #BE314A #90BE31 #31BEA5
square
#5F31BE #BE314A #90BE31 #31BEA5
split-complementary
#5F31BE #BEA531 #4ABE31
monochromatic
#2E185D #47248D #5F31BE #8158D4 #A589E1

Accessibility & contrast

On white

7.87
#5F31BE on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.67
#5F31BE on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31BE
7.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31BE#FFFFFF#000000##FFFFFF
##5F31BE1.007.872.677.87
#FFFFFF7.871.0021.001.00
#0000002.6721.001.0021.00
##FFFFFF7.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054C2
Deuteranopia (green-blind)
#004EBB
Tritanopia (blue-blind)
#3F5775
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #5f31be;
/* rgb */ color: rgb(95, 49, 190);
/* oklch */ color: oklch(46.0% 0.204 291.0);
Tailwind
colors: {
  custom: {
    50: '#966ed3',
    500: '#5f31be',
    950: '#000000',
  },
}
SCSS
$custom: #5f31be;
$custom-light: #966ed3;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31be",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 190
  },
  "hsl": {
    "h": 259.574,
    "s": 58.996,
    "l": 46.863
  },
  "oklch": {
    "l": 0.46043,
    "c": 0.20429,
    "h": 291
  },
  "luminance": 0.08347
}

Semantic roles & 50–950 ramp

primary
#5F31BE
secondary
#B2CA80
accent
#E246AF
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0E0714
muted
#7E7A83

Preview Lab

Preview with #5F31BE

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

Preview Lab → · Contrast checker → · Palette generator →

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