#331D9C#331D9C

#331D9C is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.2% C 0.188 H 279.3°. Best body text is #FFFFFF at 11.69:1 contrast (WCAG AA passes).

Color values

HEX#331D9C
RGBrgb(51, 29, 156)
HSLhsl(250, 69%, 36%)
HSVhsv(250, 81%, 61%)
CMYKcmyk(67.3%, 81.4%, 0%, 38.8%)
CIE-LABlab(23.61, 46.57, -64.40)
CIE-LCHlch(23.61, 79.47, 305.87°)
OKLaboklab(36.24% 0.0303 -0.186)
OKLCHoklch(36.24% 0.188 279.3)
XYZxyz(7.8034, 3.9822, 31.8035)
Luminance0.0398 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D9C #869C1D
analogous
#1D479C #331D9C #731D9C
triadic
#331D9C #9C331D #1D9C33
tetradic
#331D9C #9C1D47 #869C1D #1D9C73
square
#331D9C #9C1D47 #869C1D #1D9C73
split-complementary
#331D9C #9C731D #479C1D
monochromatic
#110A35 #221368 #331D9C #4427D0 #6C54DF

Accessibility & contrast

On white

11.69
#331D9C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#331D9C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D9C
11.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D9C#FFFFFF#000000##FFFFFF
##331D9C1.0011.691.8011.69
#FFFFFF11.691.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D9F
Deuteranopia (green-blind)
#00339A
Tritanopia (blue-blind)
#00445D
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #331d9c;
/* rgb */ color: rgb(51, 29, 156);
/* oklch */ color: oklch(36.2% 0.188 279.3);
Tailwind
colors: {
  custom: {
    50: '#7a5eba',
    500: '#331d9c',
    950: '#000000',
  },
}
SCSS
$custom: #331d9c;
$custom-light: #7a5eba;
$custom-dark: #000000;
JSON
{
  "hex": "#331d9c",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 156
  },
  "hsl": {
    "h": 250.394,
    "s": 68.649,
    "l": 36.275
  },
  "oklch": {
    "l": 0.36237,
    "c": 0.18842,
    "h": 279.3
  },
  "luminance": 0.03983
}

Semantic roles & 50–950 ramp

primary
#331D9C
secondary
#AFC252
accent
#EB3CCD
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #331D9C

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

Preview Lab → · Contrast checker → · Palette generator →

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