#5F31F6#5F31F6

#5F31F6 is a mid, highly saturated violet. Relative luminance 0.113; OKLCH L 51.4% C 0.265 H 282.5°. Best body text is #FFFFFF at 6.45:1 contrast (WCAG AA passes).

Color values

HEX#5F31F6
RGBrgb(95, 49, 246)
HSLhsl(254, 92%, 58%)
HSVhsv(254, 80%, 96%)
CMYKcmyk(61.4%, 80.1%, 0%, 3.5%)
CIE-LABlab(40.05, 67.46, -89.77)
CIE-LCHlch(40.05, 112.30, 306.92°)
OKLaboklab(51.38% 0.0573 -0.2589)
OKLCHoklch(51.38% 0.265 282.5)
XYZxyz(22.4470, 11.2817, 88.1656)
Luminance0.1128 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31F6 #C8F631
analogous
#3165F6 #5F31F6 #C131F6
triadic
#5F31F6 #F65F31 #31F65F
tetradic
#5F31F6 #F63165 #C8F631 #31F6C1
square
#5F31F6 #F63165 #C8F631 #31F6C1
split-complementary
#5F31F6 #F6C131 #65F631
monochromatic
#2C07A5 #3C0AE0 #5F31F6 #8D6CF9 #BAA6FB

Accessibility & contrast

On white

6.45
#5F31F6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.26
#5F31F6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F31F6
6.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31F6#FFFFFF#000000##FFFFFF
##5F31F61.006.453.266.45
#FFFFFF6.451.0021.001.00
#0000003.2621.001.0021.00
##FFFFFF6.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064FB
Deuteranopia (green-blind)
#0057F3
Tritanopia (blue-blind)
#006E95
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5f31f6;
/* rgb */ color: rgb(95, 49, 246);
/* oklch */ color: oklch(51.4% 0.265 282.5);
Tailwind
colors: {
  custom: {
    50: '#9e71fb',
    500: '#5f31f6',
    950: '#000000',
  },
}
SCSS
$custom: #5f31f6;
$custom-light: #9e71fb;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31f6",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 246
  },
  "hsl": {
    "h": 254.01,
    "s": 91.628,
    "l": 57.843
  },
  "oklch": {
    "l": 0.51383,
    "c": 0.26522,
    "h": 282.5
  },
  "luminance": 0.11283
}

Semantic roles & 50–950 ramp

primary
#5F31F6
secondary
#D6E99A
accent
#FF29CD
background
#FAF7FF
surface
#F4EDFF
border
#CEC8D7
text
#100818
muted
#7F7B86

Preview Lab

Preview with #5F31F6

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

Preview Lab → · Contrast checker → · Palette generator →

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