#5C31B7#5C31B7

#5C31B7 is a mid, vivid violet. Relative luminance 0.079; OKLCH L 45.1% C 0.196 H 291.1°. Best body text is #FFFFFF at 8.15:1 contrast (WCAG AA passes).

Color values

HEX#5C31B7
RGBrgb(92, 49, 183)
HSLhsl(259, 58%, 45%)
HSVhsv(259, 73%, 72%)
CMYKcmyk(49.7%, 73.2%, 0%, 28.2%)
CIE-LABlab(33.75, 49.96, -63.82)
CIE-LCHlch(33.75, 81.05, 308.05°)
OKLaboklab(45.12% 0.0706 -0.1832)
OKLCHoklch(45.12% 0.196 291.1)
XYZxyz(14.0568, 7.8903, 45.5729)
Luminance0.0789 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5C31B7 #8CB731
analogous
#3149B7 #5C31B7 #9F31B7
triadic
#5C31B7 #B75C31 #31B75C
tetradic
#5C31B7 #B73149 #8CB731 #31B79F
square
#5C31B7 #B73149 #8CB731 #31B79F
split-complementary
#5C31B7 #B79F31 #49B731
monochromatic
#2B1756 #442487 #5C31B7 #7C54D1 #A184DE

Accessibility & contrast

On white

8.15
#5C31B7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.58
#5C31B7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5C31B7
8.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5C31B7#FFFFFF#000000##FFFFFF
##5C31B71.008.152.588.15
#FFFFFF8.151.0021.001.00
#0000002.5821.001.0021.00
##FFFFFF8.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052BB
Deuteranopia (green-blind)
#004CB4
Tritanopia (blue-blind)
#3D5571
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #5c31b7;
/* rgb */ color: rgb(92, 49, 183);
/* oklch */ color: oklch(45.1% 0.196 291.1);
Tailwind
colors: {
  custom: {
    50: '#936dce',
    500: '#5c31b7',
    950: '#000000',
  },
}
SCSS
$custom: #5c31b7;
$custom-light: #936dce;
$custom-dark: #000000;
JSON
{
  "hex": "#5c31b7",
  "rgb": {
    "r": 92,
    "g": 49,
    "b": 183
  },
  "hsl": {
    "h": 259.254,
    "s": 57.759,
    "l": 45.49
  },
  "oklch": {
    "l": 0.45115,
    "c": 0.19634,
    "h": 291.1
  },
  "luminance": 0.07891
}

Semantic roles & 50–950 ramp

primary
#5C31B7
secondary
#AFC87C
accent
#E147B0
background
#F9F6FC
surface
#F2ECF9
border
#CCC7D2
text
#0E0714
muted
#7E7A82

Preview Lab

Preview with #5C31B7

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

Preview Lab → · Contrast checker → · Palette generator →

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