#331D84#331D84

#331D84 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.159 H 283.5°. Best body text is #FFFFFF at 12.73:1 contrast (WCAG AA passes).

Color values

HEX#331D84
RGBrgb(51, 29, 132)
HSLhsl(253, 64%, 32%)
HSVhsv(253, 78%, 52%)
CMYKcmyk(61.4%, 78%, 0%, 48.2%)
CIE-LABlab(21.01, 39.20, -53.79)
CIE-LCHlch(21.01, 66.56, 306.08°)
OKLaboklab(33.65% 0.0373 -0.155)
OKLCHoklch(33.65% 0.159 283.5)
XYZxyz(5.9682, 3.2481, 22.1378)
Luminance0.0325 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D84 #6E841D
analogous
#1D3A84 #331D84 #671D84
triadic
#331D84 #84331D #1D8433
tetradic
#331D84 #841D3A #6E841D #1D8467
square
#331D84 #841D3A #6E841D #1D8467
split-complementary
#331D84 #84671D #3A841D
monochromatic
#0C0720 #201252 #331D84 #4628B6 #6445D6

Accessibility & contrast

On white

12.73
#331D84 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#331D84 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D84
12.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D84#FFFFFF#000000##FFFFFF
##331D841.0012.731.6512.73
#FFFFFF12.731.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003687
Deuteranopia (green-blind)
#002F82
Tritanopia (blue-blind)
#003A4F
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331d84;
/* rgb */ color: rgb(51, 29, 132);
/* oklch */ color: oklch(33.6% 0.159 283.5);
Tailwind
colors: {
  custom: {
    50: '#755ca9',
    500: '#331d84',
    950: '#000000',
  },
}
SCSS
$custom: #331d84;
$custom-light: #755ca9;
$custom-dark: #000000;
JSON
{
  "hex": "#331d84",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 132
  },
  "hsl": {
    "h": 252.816,
    "s": 63.975,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33649,
    "c": 0.15947,
    "h": 283.5
  },
  "luminance": 0.03248
}

Semantic roles & 50–950 ramp

primary
#331D84
secondary
#9FB746
accent
#E741C3
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331D84

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

Preview Lab → · Contrast checker → · Palette generator →

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