#331D8D#331D8D

#331D8D is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.6% C 0.171 H 281.8°. Best body text is #FFFFFF at 12.34:1 contrast (WCAG AA passes).

Color values

HEX#331D8D
RGBrgb(51, 29, 141)
HSLhsl(252, 66%, 33%)
HSVhsv(252, 79%, 55%)
CMYKcmyk(63.8%, 79.4%, 0%, 44.7%)
CIE-LABlab(21.96, 41.99, -57.86)
CIE-LCHlch(21.96, 71.49, 305.97°)
OKLaboklab(34.6% 0.0348 -0.1669)
OKLCHoklch(34.6% 0.171 281.8)
XYZxyz(6.6108, 3.5051, 25.5223)
Luminance0.0351 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D8D #778D1D
analogous
#1D3F8D #331D8D #6B1D8D
triadic
#331D8D #8D331D #1D8D33
tetradic
#331D8D #8D1D3F #778D1D #1D8D6B
square
#331D8D #8D1D3F #778D1D #1D8D6B
split-complementary
#331D8D #8D6B1D #3F8D1D
monochromatic
#0E0827 #21135A #331D8D #4527C0 #674BDA

Accessibility & contrast

On white

12.34
#331D8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#331D8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D8D
12.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D8D#FFFFFF#000000##FFFFFF
##331D8D1.0012.341.7012.34
#FFFFFF12.341.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003890
Deuteranopia (green-blind)
#00318B
Tritanopia (blue-blind)
#003E54
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331d8d;
/* rgb */ color: rgb(51, 29, 141);
/* oklch */ color: oklch(34.6% 0.171 281.8);
Tailwind
colors: {
  custom: {
    50: '#775daf',
    500: '#331d8d',
    950: '#000000',
  },
}
SCSS
$custom: #331d8d;
$custom-light: #775daf;
$custom-dark: #000000;
JSON
{
  "hex": "#331d8d",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 141
  },
  "hsl": {
    "h": 251.786,
    "s": 65.882,
    "l": 33.333
  },
  "oklch": {
    "l": 0.34601,
    "c": 0.1705,
    "h": 281.8
  },
  "luminance": 0.03506
}

Semantic roles & 50–950 ramp

primary
#331D8D
secondary
#A6BC4A
accent
#E93FC7
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331D8D

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

Preview Lab → · Contrast checker → · Palette generator →

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