#331D78#331D78

#331D78 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.4% C 0.144 H 286.3°. Best body text is #FFFFFF at 13.23:1 contrast (WCAG AA passes).

Color values

HEX#331D78
RGBrgb(51, 29, 120)
HSLhsl(255, 61%, 29%)
HSVhsv(255, 76%, 47%)
CMYKcmyk(57.5%, 75.8%, 0%, 52.9%)
CIE-LABlab(19.80, 35.45, -48.17)
CIE-LCHlch(19.80, 59.81, 306.35°)
OKLaboklab(32.42% 0.0405 -0.1386)
OKLCHoklch(32.42% 0.144 286.3)
XYZxyz(5.1938, 2.9383, 18.0591)
Luminance0.0294 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D78 #62781D
analogous
#1D3578 #331D78 #611D78
triadic
#331D78 #78331D #1D7833
tetradic
#331D78 #781D35 #62781D #1D7861
square
#331D78 #781D35 #62781D #1D7861
split-complementary
#331D78 #78611D #35781D
monochromatic
#0A0619 #1E1147 #331D78 #4829A9 #623FD1

Accessibility & contrast

On white

13.23
#331D78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#331D78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D78
13.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D78#FFFFFF#000000##FFFFFF
##331D781.0013.231.5913.23
#FFFFFF13.231.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.231.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327B
Deuteranopia (green-blind)
#002D76
Tritanopia (blue-blind)
#143649
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331d78;
/* rgb */ color: rgb(51, 29, 120);
/* oklch */ color: oklch(32.4% 0.144 286.3);
Tailwind
colors: {
  custom: {
    50: '#735ba0',
    500: '#331d78',
    950: '#000000',
  },
}
SCSS
$custom: #331d78;
$custom-light: #735ba0;
$custom-dark: #000000;
JSON
{
  "hex": "#331d78",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 120
  },
  "hsl": {
    "h": 254.505,
    "s": 61.074,
    "l": 29.216
  },
  "oklch": {
    "l": 0.32423,
    "c": 0.14439,
    "h": 286.3
  },
  "luminance": 0.02939
}

Semantic roles & 50–950 ramp

primary
#331D78
secondary
#93AC45
accent
#E444BD
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #331D78

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

Preview Lab → · Contrast checker → · Palette generator →

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