#5F31BA#5F31BA

#5F31BA is a mid, vivid violet. Relative luminance 0.082; OKLCH L 45.7% C 0.200 H 291.8°. Best body text is #FFFFFF at 7.97:1 contrast (WCAG AA passes).

Color values

HEX#5F31BA
RGBrgb(95, 49, 186)
HSLhsl(260, 58%, 46%)
HSVhsv(260, 74%, 73%)
CMYKcmyk(48.9%, 73.7%, 0%, 27.1%)
CIE-LABlab(34.34, 51.26, -64.62)
CIE-LCHlch(34.34, 82.48, 308.42°)
OKLaboklab(45.69% 0.0743 -0.1854)
OKLCHoklch(45.69% 0.2 291.8)
XYZxyz(14.6781, 8.1742, 47.2492)
Luminance0.0818 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31BA #8CBA31
analogous
#3147BA #5F31BA #A331BA
triadic
#5F31BA #BA5F31 #31BA5F
tetradic
#5F31BA #BA3147 #8CBA31 #31BAA3
square
#5F31BA #BA3147 #8CBA31 #31BAA3
split-complementary
#5F31BA #BAA331 #47BA31
monochromatic
#2E1759 #46248A #5F31BA #8056D2 #A486DF

Accessibility & contrast

On white

7.97
#5F31BA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.64
#5F31BA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31BA
7.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31BA#FFFFFF#000000##FFFFFF
##5F31BA1.007.972.647.97
#FFFFFF7.971.0021.001.00
#0000002.6421.001.0021.00
##FFFFFF7.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053BE
Deuteranopia (green-blind)
#004EB7
Tritanopia (blue-blind)
#415673
Achromatopsia (no color)
#515151

Design tokens & code

CSS
--color: #5f31ba;
/* rgb */ color: rgb(95, 49, 186);
/* oklch */ color: oklch(45.7% 0.200 291.8);
Tailwind
colors: {
  custom: {
    50: '#956ed0',
    500: '#5f31ba',
    950: '#000000',
  },
}
SCSS
$custom: #5f31ba;
$custom-light: #956ed0;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31ba",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 186
  },
  "hsl": {
    "h": 260.146,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.45688,
    "c": 0.19977,
    "h": 291.8
  },
  "luminance": 0.08175
}

Semantic roles & 50–950 ramp

primary
#5F31BA
secondary
#B0C97E
accent
#E246AD
background
#F9F6FC
surface
#F2ECF9
border
#CCC7D2
text
#0E0714
muted
#7E7A82

Preview Lab

Preview with #5F31BA

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

Preview Lab → · Contrast checker → · Palette generator →

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