#331F86#331F86

#331F86 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.1% C 0.160 H 282.8°. Best body text is #FFFFFF at 12.49:1 contrast (WCAG AA passes).

Color values

HEX#331F86
RGBrgb(51, 31, 134)
HSLhsl(252, 62%, 32%)
HSVhsv(252, 77%, 53%)
CMYKcmyk(61.9%, 76.9%, 0%, 47.5%)
CIE-LABlab(21.60, 38.75, -54.09)
CIE-LCHlch(21.60, 66.54, 305.62°)
OKLaboklab(34.12% 0.0354 -0.1559)
OKLCHoklch(34.12% 0.16 282.8)
XYZxyz(6.1570, 3.4046, 22.8823)
Luminance0.0340 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F86 #72861F
analogous
#1F3F86 #331F86 #661F86
triadic
#331F86 #86331F #1F8633
tetradic
#331F86 #861F3F #72861F #1F8666
square
#331F86 #861F3F #72861F #1F8666
split-complementary
#331F86 #86661F #3F861F
monochromatic
#0D0823 #201454 #331F86 #462AB8 #654AD5

Accessibility & contrast

On white

12.49
#331F86 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#331F86 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F86
12.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F86#FFFFFF#000000##FFFFFF
##331F861.0012.491.6812.49
#FFFFFF12.491.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003789
Deuteranopia (green-blind)
#003084
Tritanopia (blue-blind)
#003C51
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331f86;
/* rgb */ color: rgb(51, 31, 134);
/* oklch */ color: oklch(34.1% 0.160 282.8);
Tailwind
colors: {
  custom: {
    50: '#765daa',
    500: '#331f86',
    950: '#000000',
  },
}
SCSS
$custom: #331f86;
$custom-light: #765daa;
$custom-dark: #000000;
JSON
{
  "hex": "#331f86",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 134
  },
  "hsl": {
    "h": 251.65,
    "s": 62.424,
    "l": 32.353
  },
  "oklch": {
    "l": 0.34123,
    "c": 0.15988,
    "h": 282.8
  },
  "luminance": 0.03405
}

Semantic roles & 50–950 ramp

primary
#331F86
secondary
#A2B849
accent
#E542C6
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331F86

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

Preview Lab → · Contrast checker → · Palette generator →

#331F86 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva