#331D86#331D86

#331D86 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.9% C 0.162 H 283.1°. Best body text is #FFFFFF at 12.64:1 contrast (WCAG AA passes).

Color values

HEX#331D86
RGBrgb(51, 29, 134)
HSLhsl(253, 64%, 32%)
HSVhsv(253, 78%, 53%)
CMYKcmyk(61.9%, 78.4%, 0%, 47.5%)
CIE-LABlab(21.22, 39.82, -54.71)
CIE-LCHlch(21.22, 67.67, 306.05°)
OKLaboklab(33.86% 0.0368 -0.1577)
OKLCHoklch(33.86% 0.162 283.1)
XYZxyz(6.1063, 3.3034, 22.8655)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D86 #70861D
analogous
#1D3C86 #331D86 #671D86
triadic
#331D86 #86331D #1D8633
tetradic
#331D86 #861D3C #70861D #1D8667
square
#331D86 #861D3C #70861D #1D8667
split-complementary
#331D86 #86671D #3C861D
monochromatic
#0D0721 #201254 #331D86 #4628B8 #6546D7

Accessibility & contrast

On white

12.64
#331D86 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#331D86 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D86
12.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D86#FFFFFF#000000##FFFFFF
##331D861.0012.641.6612.64
#FFFFFF12.641.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003689
Deuteranopia (green-blind)
#002F84
Tritanopia (blue-blind)
#003B50
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331d86;
/* rgb */ color: rgb(51, 29, 134);
/* oklch */ color: oklch(33.9% 0.162 283.1);
Tailwind
colors: {
  custom: {
    50: '#765caa',
    500: '#331d86',
    950: '#000000',
  },
}
SCSS
$custom: #331d86;
$custom-light: #765caa;
$custom-dark: #000000;
JSON
{
  "hex": "#331d86",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 134
  },
  "hsl": {
    "h": 252.571,
    "s": 64.417,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33858,
    "c": 0.16194,
    "h": 283.1
  },
  "luminance": 0.03304
}

Semantic roles & 50–950 ramp

primary
#331D86
secondary
#A1B946
accent
#E740C4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331D86

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

Preview Lab → · Contrast checker → · Palette generator →

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