#5F31D3#5F31D3

#5F31D3 is a mid, highly saturated violet. Relative luminance 0.093; OKLCH L 48.0% C 0.228 H 287.3°. Best body text is #FFFFFF at 7.33:1 contrast (WCAG AA passes).

Color values

HEX#5F31D3
RGBrgb(95, 49, 211)
HSLhsl(257, 65%, 51%)
HSVhsv(257, 77%, 83%)
CMYKcmyk(55%, 76.8%, 0%, 17.3%)
CIE-LABlab(36.62, 58.05, -75.49)
CIE-LCHlch(36.62, 95.23, 307.56°)
OKLaboklab(47.97% 0.0678 -0.2173)
OKLCHoklch(47.97% 0.228 287.3)
XYZxyz(17.5720, 9.3317, 62.4907)
Luminance0.0933 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31D3 #A5D331
analogous
#3154D3 #5F31D3 #B031D3
triadic
#5F31D3 #D35F31 #31D35F
tetradic
#5F31D3 #D33154 #A5D331 #31D3B0
square
#5F31D3 #D33154 #A5D331 #31D3B0
split-complementary
#5F31D3 #D3B031 #54D331
monochromatic
#321871 #4823A4 #5F31D3 #8663DE #AD96E9

Accessibility & contrast

On white

7.33
#5F31D3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.87
#5F31D3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31D3
7.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31D3#FFFFFF#000000##FFFFFF
##5F31D31.007.332.877.33
#FFFFFF7.331.0021.001.00
#0000002.8721.001.0021.00
##FFFFFF7.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AD8
Deuteranopia (green-blind)
#0052D0
Tritanopia (blue-blind)
#2C6081
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #5f31d3;
/* rgb */ color: rgb(95, 49, 211);
/* oklch */ color: oklch(48.0% 0.228 287.3);
Tailwind
colors: {
  custom: {
    50: '#996fe2',
    500: '#5f31d3',
    950: '#000000',
  },
}
SCSS
$custom: #5f31d3;
$custom-light: #996fe2;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31d3",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 211
  },
  "hsl": {
    "h": 257.037,
    "s": 64.8,
    "l": 50.98
  },
  "oklch": {
    "l": 0.47974,
    "c": 0.2276,
    "h": 287.3
  },
  "luminance": 0.09333
}

Semantic roles & 50–950 ramp

primary
#5F31D3
secondary
#BFD48C
accent
#E840B8
background
#FAF6FE
surface
#F4ECFC
border
#CEC7D5
text
#0F0816
muted
#7F7B84

Preview Lab

Preview with #5F31D3

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

Preview Lab → · Contrast checker → · Palette generator →

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