#5F31BC#5F31BC

#5F31BC is a mid, highly saturated violet. Relative luminance 0.083; OKLCH L 45.9% C 0.202 H 291.4°. Best body text is #FFFFFF at 7.92:1 contrast (WCAG AA passes).

Color values

HEX#5F31BC
RGBrgb(95, 49, 188)
HSLhsl(260, 59%, 46%)
HSVhsv(260, 74%, 74%)
CMYKcmyk(49.5%, 73.9%, 0%, 26.3%)
CIE-LABlab(34.52, 51.80, -65.51)
CIE-LCHlch(34.52, 83.52, 308.33°)
OKLaboklab(45.87% 0.0739 -0.188)
OKLCHoklch(45.87% 0.202 291.4)
XYZxyz(14.8922, 8.2598, 48.3768)
Luminance0.0826 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31BC #8EBC31
analogous
#3149BC #5F31BC #A531BC
triadic
#5F31BC #BC5F31 #31BC5F
tetradic
#5F31BC #BC3149 #8EBC31 #31BCA5
square
#5F31BC #BC3149 #8EBC31 #31BCA5
split-complementary
#5F31BC #BCA531 #49BC31
monochromatic
#2E185B #46248B #5F31BC #8057D3 #A588E0

Accessibility & contrast

On white

7.92
#5F31BC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.65
#5F31BC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31BC
7.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31BC#FFFFFF#000000##FFFFFF
##5F31BC1.007.922.657.92
#FFFFFF7.921.0021.001.00
#0000002.6521.001.0021.00
##FFFFFF7.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053C0
Deuteranopia (green-blind)
#004EB9
Tritanopia (blue-blind)
#405674
Achromatopsia (no color)
#515151

Design tokens & code

CSS
--color: #5f31bc;
/* rgb */ color: rgb(95, 49, 188);
/* oklch */ color: oklch(45.9% 0.202 291.4);
Tailwind
colors: {
  custom: {
    50: '#956ed1',
    500: '#5f31bc',
    950: '#000000',
  },
}
SCSS
$custom: #5f31bc;
$custom-light: #956ed1;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31bc",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 188
  },
  "hsl": {
    "h": 259.856,
    "s": 58.65,
    "l": 46.471
  },
  "oklch": {
    "l": 0.45865,
    "c": 0.20203,
    "h": 291.4
  },
  "luminance": 0.0826
}

Semantic roles & 50–950 ramp

primary
#5F31BC
secondary
#B1CA7F
accent
#E246AE
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0E0714
muted
#7E7A83

Preview Lab

Preview with #5F31BC

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

Preview Lab → · Contrast checker → · Palette generator →

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