#331D72#331D72

#331D72 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.8% C 0.137 H 287.9°. Best body text is #FFFFFF at 13.47:1 contrast (WCAG AA passes).

Color values

HEX#331D72
RGBrgb(51, 29, 114)
HSLhsl(256, 59%, 28%)
HSVhsv(256, 75%, 45%)
CMYKcmyk(55.3%, 74.6%, 0%, 55.3%)
CIE-LABlab(19.21, 33.56, -45.27)
CIE-LCHlch(19.21, 56.35, 306.55°)
OKLaboklab(31.83% 0.0419 -0.1301)
OKLCHoklch(31.83% 0.137 287.9)
XYZxyz(4.8410, 2.7972, 16.2012)
Luminance0.0280 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D72 #5C721D
analogous
#1D3272 #331D72 #5D1D72
triadic
#331D72 #72331D #1D7233
tetradic
#331D72 #721D32 #5C721D #1D725D
square
#331D72 #721D32 #5C721D #1D725D
split-complementary
#331D72 #725D1D #32721D
monochromatic
#0B0618 #1D1141 #331D72 #4929A3 #623CCD

Accessibility & contrast

On white

13.47
#331D72 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#331D72 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D72
13.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D72#FFFFFF#000000##FFFFFF
##331D721.0013.471.5613.47
#FFFFFF13.471.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003175
Deuteranopia (green-blind)
#002C70
Tritanopia (blue-blind)
#1A3345
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331d72;
/* rgb */ color: rgb(51, 29, 114);
/* oklch */ color: oklch(31.8% 0.137 287.9);
Tailwind
colors: {
  custom: {
    50: '#725b9b',
    500: '#331d72',
    950: '#000000',
  },
}
SCSS
$custom: #331d72;
$custom-light: #725b9b;
$custom-dark: #000000;
JSON
{
  "hex": "#331d72",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 114
  },
  "hsl": {
    "h": 255.529,
    "s": 59.441,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31832,
    "c": 0.13668,
    "h": 287.9
  },
  "luminance": 0.02797
}

Semantic roles & 50–950 ramp

primary
#331D72
secondary
#8DA645
accent
#E345BA
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331D72

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

Preview Lab → · Contrast checker → · Palette generator →

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