#331D8E#331D8E

#331D8E is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.7% C 0.172 H 281.6°. Best body text is #FFFFFF at 12.30:1 contrast (WCAG AA passes).

Color values

HEX#331D8E
RGBrgb(51, 29, 142)
HSLhsl(252, 66%, 34%)
HSVhsv(252, 80%, 56%)
CMYKcmyk(64.1%, 79.6%, 0%, 44.3%)
CIE-LABlab(22.07, 42.30, -58.31)
CIE-LCHlch(22.07, 72.04, 305.96°)
OKLaboklab(34.71% 0.0345 -0.1682)
OKLCHoklch(34.71% 0.172 281.6)
XYZxyz(6.6856, 3.5350, 25.9160)
Luminance0.0354 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D8E #788E1D
analogous
#1D3F8E #331D8E #6B1D8E
triadic
#331D8E #8E331D #1D8E33
tetradic
#331D8E #8E1D3F #788E1D #1D8E6B
square
#331D8E #8E1D3F #788E1D #1D8E6B
split-complementary
#331D8E #8E6B1D #3F8E1D
monochromatic
#0E0828 #21135B #331D8E #4527C1 #674BDA

Accessibility & contrast

On white

12.30
#331D8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#331D8E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D8E
12.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D8E#FFFFFF#000000##FFFFFF
##331D8E1.0012.301.7112.30
#FFFFFF12.301.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003991
Deuteranopia (green-blind)
#00318C
Tritanopia (blue-blind)
#003E55
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331d8e;
/* rgb */ color: rgb(51, 29, 142);
/* oklch */ color: oklch(34.7% 0.172 281.6);
Tailwind
colors: {
  custom: {
    50: '#785db0',
    500: '#331d8e',
    950: '#000000',
  },
}
SCSS
$custom: #331d8e;
$custom-light: #785db0;
$custom-dark: #000000;
JSON
{
  "hex": "#331d8e",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 142
  },
  "hsl": {
    "h": 251.681,
    "s": 66.082,
    "l": 33.529
  },
  "oklch": {
    "l": 0.34708,
    "c": 0.17172,
    "h": 281.6
  },
  "luminance": 0.03536
}

Semantic roles & 50–950 ramp

primary
#331D8E
secondary
#A6BD4A
accent
#E93FC8
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331D8E

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

Preview Lab → · Contrast checker → · Palette generator →

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