#5F31B8#5F31B8

#5F31B8 is a mid, vivid violet. Relative luminance 0.081; OKLCH L 45.5% C 0.198 H 292.3°. Best body text is #FFFFFF at 8.02:1 contrast (WCAG AA passes).

Color values

HEX#5F31B8
RGBrgb(95, 49, 184)
HSLhsl(260, 58%, 46%)
HSVhsv(260, 73%, 72%)
CMYKcmyk(48.4%, 73.4%, 0%, 27.8%)
CIE-LABlab(34.17, 50.72, -63.72)
CIE-LCHlch(34.17, 81.44, 308.52°)
OKLaboklab(45.51% 0.0748 -0.1828)
OKLCHoklch(45.51% 0.198 292.3)
XYZxyz(14.4669, 8.0897, 46.1373)
Luminance0.0809 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F31B8 #8AB831
analogous
#3147B8 #5F31B8 #A231B8
triadic
#5F31B8 #B85F31 #31B85F
tetradic
#5F31B8 #B83147 #8AB831 #31B8A2
square
#5F31B8 #B83147 #8AB831 #31B8A2
split-complementary
#5F31B8 #B8A231 #47B831
monochromatic
#2D1757 #462488 #5F31B8 #7F55D2 #A385DE

Accessibility & contrast

On white

8.02
#5F31B8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.62
#5F31B8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F31B8
8.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F31B8#FFFFFF#000000##FFFFFF
##5F31B81.008.022.628.02
#FFFFFF8.021.0021.001.00
#0000002.6221.001.0021.00
##FFFFFF8.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052BC
Deuteranopia (green-blind)
#004EB5
Tritanopia (blue-blind)
#435572
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #5f31b8;
/* rgb */ color: rgb(95, 49, 184);
/* oklch */ color: oklch(45.5% 0.198 292.3);
Tailwind
colors: {
  custom: {
    50: '#956ece',
    500: '#5f31b8',
    950: '#000000',
  },
}
SCSS
$custom: #5f31b8;
$custom-light: #956ece;
$custom-dark: #000000;
JSON
{
  "hex": "#5f31b8",
  "rgb": {
    "r": 95,
    "g": 49,
    "b": 184
  },
  "hsl": {
    "h": 260.444,
    "s": 57.94,
    "l": 45.686
  },
  "oklch": {
    "l": 0.45511,
    "c": 0.19751,
    "h": 292.3
  },
  "luminance": 0.0809
}

Semantic roles & 50–950 ramp

primary
#5F31B8
secondary
#AEC87D
accent
#E147AD
background
#F9F6FC
surface
#F2ECF9
border
#CCC7D2
text
#0E0714
muted
#7E7A82

Preview Lab

Preview with #5F31B8

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

Preview Lab → · Contrast checker → · Palette generator →

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