#331D9A#331D9A

#331D9A is a dark, vivid violet. Relative luminance 0.039; OKLCH L 36.0% C 0.186 H 279.6°. Best body text is #FFFFFF at 11.78:1 contrast (WCAG AA passes).

Color values

HEX#331D9A
RGBrgb(51, 29, 154)
HSLhsl(251, 68%, 36%)
HSVhsv(251, 81%, 60%)
CMYKcmyk(66.9%, 81.2%, 0%, 39.6%)
CIE-LABlab(23.39, 45.97, -63.55)
CIE-LCHlch(23.39, 78.43, 305.88°)
OKLaboklab(36.02% 0.0309 -0.1835)
OKLCHoklch(36.02% 0.186 279.6)
XYZxyz(7.6355, 3.9150, 30.9189)
Luminance0.0392 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D9A #849A1D
analogous
#1D459A #331D9A #711D9A
triadic
#331D9A #9A331D #1D9A33
tetradic
#331D9A #9A1D45 #849A1D #1D9A71
square
#331D9A #9A1D45 #849A1D #1D9A71
split-complementary
#331D9A #9A711D #459A1D
monochromatic
#110A33 #221366 #331D9A #4427CE #6B53DF

Accessibility & contrast

On white

11.78
#331D9A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.78
#331D9A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D9A
11.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D9A#FFFFFF#000000##FFFFFF
##331D9A1.0011.781.7811.78
#FFFFFF11.781.0021.001.00
#0000001.7821.001.0021.00
##FFFFFF11.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C9D
Deuteranopia (green-blind)
#003398
Tritanopia (blue-blind)
#00435C
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #331d9a;
/* rgb */ color: rgb(51, 29, 154);
/* oklch */ color: oklch(36.0% 0.186 279.6);
Tailwind
colors: {
  custom: {
    50: '#7a5db9',
    500: '#331d9a',
    950: '#000000',
  },
}
SCSS
$custom: #331d9a;
$custom-light: #7a5db9;
$custom-dark: #000000;
JSON
{
  "hex": "#331d9a",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 154
  },
  "hsl": {
    "h": 250.56,
    "s": 68.306,
    "l": 35.882
  },
  "oklch": {
    "l": 0.36015,
    "c": 0.18606,
    "h": 279.6
  },
  "luminance": 0.03916
}

Semantic roles & 50–950 ramp

primary
#331D9A
secondary
#AEC251
accent
#EB3DCC
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #331D9A

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

Preview Lab → · Contrast checker → · Palette generator →

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