#5F31CA#5F31CA

#5F31CA is a mid, highly saturated violet. Relative luminance 0.089; OKLCH L 47.1% C 0.218 H 288.8°. Best body text is #FFFFFF at 7.56:1 contrast (WCAG AA passes).

Color values

HEX#5F31CA
RGBrgb(95, 49, 202)
HSLhsl(258, 61%, 49%)
HSVhsv(258, 76%, 79%)
CMYKcmyk(53%, 75.7%, 0%, 20.8%)
CIE-LABlab(35.78, 55.60, -71.65)
CIE-LCHlch(35.78, 90.69, 307.81°)
OKLaboklab(47.13% 0.0703 -0.206)
OKLCHoklch(47.13% 0.218 288.8)
XYZxyz(16.4752, 8.8930, 56.7141)
Luminance0.0889 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31CA #9CCA31
analogous
#3150CA #5F31CA #AC31CA
triadic
#5F31CA #CA5F31 #31CA5F
tetradic
#5F31CA #CA3150 #9CCA31 #31CAAC
square
#5F31CA #CA3150 #9CCA31 #31CAAC
split-complementary
#5F31CA #CAAC31 #50CA31
monochromatic
#311967 #482599 #5F31CA #8460D8 #AA91E4

Accessibility & contrast

On white

7.56
#5F31CA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.78
#5F31CA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31CA
7.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31CA#FFFFFF#000000##FFFFFF
##5F31CA1.007.562.787.56
#FFFFFF7.561.0021.001.00
#0000002.7821.001.0021.00
##FFFFFF7.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057CE
Deuteranopia (green-blind)
#0050C7
Tritanopia (blue-blind)
#355C7C
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #5f31ca;
/* rgb */ color: rgb(95, 49, 202);
/* oklch */ color: oklch(47.1% 0.218 288.8);
Tailwind
colors: {
  custom: {
    50: '#976edb',
    500: '#5f31ca',
    950: '#000000',
  },
}
SCSS
$custom: #5f31ca;
$custom-light: #976edb;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31ca",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 202
  },
  "hsl": {
    "h": 258.039,
    "s": 60.956,
    "l": 49.216
  },
  "oklch": {
    "l": 0.47134,
    "c": 0.21768,
    "h": 288.8
  },
  "luminance": 0.08894
}

Semantic roles & 50–950 ramp

primary
#5F31CA
secondary
#BACF88
accent
#E444B4
background
#FAF6FD
surface
#F3ECFB
border
#CDC7D4
text
#0F0815
muted
#7F7B83

Preview Lab

Preview with #5F31CA

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

Preview Lab → · Contrast checker → · Palette generator →

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