#331D7D#331D7D

#331D7D is a dark, vivid violet. Relative luminance 0.031; OKLCH L 32.9% C 0.151 H 285.1°. Best body text is #FFFFFF at 13.02:1 contrast (WCAG AA passes).

Color values

HEX#331D7D
RGBrgb(51, 29, 125)
HSLhsl(254, 62%, 30%)
HSVhsv(254, 77%, 49%)
CMYKcmyk(59.2%, 76.8%, 0%, 51%)
CIE-LABlab(20.29, 37.02, -50.54)
CIE-LCHlch(20.29, 62.65, 306.22°)
OKLaboklab(32.93% 0.0392 -0.1455)
OKLCHoklch(32.93% 0.151 285.1)
XYZxyz(5.5052, 3.0629, 19.6992)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D7D #677D1D
analogous
#1D377D #331D7D #631D7D
triadic
#331D7D #7D331D #1D7D33
tetradic
#331D7D #7D1D37 #677D1D #1D7D63
square
#331D7D #7D1D37 #677D1D #1D7D63
split-complementary
#331D7D #7D631D #377D1D
monochromatic
#0A061A #1F114B #331D7D #4729AF #6341D3

Accessibility & contrast

On white

13.02
#331D7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#331D7D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D7D
13.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D7D#FFFFFF#000000##FFFFFF
##331D7D1.0013.021.6113.02
#FFFFFF13.021.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003480
Deuteranopia (green-blind)
#002E7B
Tritanopia (blue-blind)
#0D384B
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331d7d;
/* rgb */ color: rgb(51, 29, 125);
/* oklch */ color: oklch(32.9% 0.151 285.1);
Tailwind
colors: {
  custom: {
    50: '#745ca4',
    500: '#331d7d',
    950: '#000000',
  },
}
SCSS
$custom: #331d7d;
$custom-light: #745ca4;
$custom-dark: #000000;
JSON
{
  "hex": "#331d7d",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 125
  },
  "hsl": {
    "h": 253.75,
    "s": 62.338,
    "l": 30.196
  },
  "oklch": {
    "l": 0.32928,
    "c": 0.15073,
    "h": 285.1
  },
  "luminance": 0.03063
}

Semantic roles & 50–950 ramp

primary
#331D7D
secondary
#98B145
accent
#E542C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331D7D

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

Preview Lab → · Contrast checker → · Palette generator →

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