#5F31B2#5F31B2

#5F31B2 is a dark, vivid violet. Relative luminance 0.078; OKLCH L 45.0% C 0.191 H 293.5°. Best body text is #FFFFFF at 8.18:1 contrast (WCAG AA passes).

Color values

HEX#5F31B2
RGBrgb(95, 49, 178)
HSLhsl(261, 57%, 45%)
HSVhsv(261, 72%, 70%)
CMYKcmyk(46.6%, 72.5%, 0%, 30.2%)
CIE-LABlab(33.65, 49.09, -61.00)
CIE-LCHlch(33.65, 78.30, 308.82°)
OKLaboklab(44.99% 0.0761 -0.1748)
OKLCHoklch(44.99% 0.191 293.5)
XYZxyz(13.8513, 7.8434, 42.8950)
Luminance0.0784 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31B2 #84B231
analogous
#3144B2 #5F31B2 #9F31B2
triadic
#5F31B2 #B25F31 #31B25F
tetradic
#5F31B2 #B23144 #84B231 #31B29F
square
#5F31B2 #B23144 #84B231 #31B29F
split-complementary
#5F31B2 #B29F31 #44B231
monochromatic
#2C1752 #452482 #5F31B2 #7E51CF #A281DC

Accessibility & contrast

On white

8.18
#5F31B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.57
#5F31B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31B2
8.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31B2#FFFFFF#000000##FFFFFF
##5F31B21.008.182.578.18
#FFFFFF8.181.0021.001.00
#0000002.5721.001.0021.00
##FFFFFF8.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051B6
Deuteranopia (green-blind)
#004DAF
Tritanopia (blue-blind)
#46526E
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #5f31b2;
/* rgb */ color: rgb(95, 49, 178);
/* oklch */ color: oklch(45.0% 0.191 293.5);
Tailwind
colors: {
  custom: {
    50: '#946dca',
    500: '#5f31b2',
    950: '#000000',
  },
}
SCSS
$custom: #5f31b2;
$custom-light: #946dca;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31b2",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 178
  },
  "hsl": {
    "h": 261.395,
    "s": 56.828,
    "l": 44.51
  },
  "oklch": {
    "l": 0.44989,
    "c": 0.19068,
    "h": 293.5
  },
  "luminance": 0.07844
}

Semantic roles & 50–950 ramp

primary
#5F31B2
secondary
#AAC579
accent
#E048AA
background
#F9F6FC
surface
#F2ECF8
border
#CCC7D1
text
#0E0713
muted
#7E7A82

Preview Lab

Preview with #5F31B2

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

Preview Lab → · Contrast checker → · Palette generator →

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