#331D4F#331D4F

#331D4F is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.8% C 0.089 H 301.3°. Best body text is #FFFFFF at 14.69:1 contrast (WCAG AA passes).

Color values

HEX#331D4F
RGBrgb(51, 29, 79)
HSLhsl(266, 46%, 21%)
HSVhsv(266, 63%, 31%)
CMYKcmyk(35.4%, 63.3%, 0%, 69%)
CIE-LABlab(16.24, 22.75, -26.91)
CIE-LCHlch(16.24, 35.23, 310.21°)
OKLaboklab(28.76% 0.0463 -0.0761)
OKLCHoklch(28.76% 0.089 301.3)
XYZxyz(3.2156, 2.1470, 7.6406)
Luminance0.0215 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D4F #394F1D
analogous
#1D204F #331D4F #4C1D4F
triadic
#331D4F #4F331D #1D4F33
tetradic
#331D4F #4F1D20 #394F1D #1D4F4C
square
#331D4F #4F1D20 #394F1D #1D4F4C
split-complementary
#331D4F #4F4C1D #204F1D
monochromatic
#0E0816 #160D22 #331D4F #502D7C #6D3EA9

Accessibility & contrast

On white

14.69
#331D4F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#331D4F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D4F
14.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D4F#FFFFFF#000000##FFFFFF
##331D4F1.0014.691.4314.69
#FFFFFF14.691.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#062851
Deuteranopia (green-blind)
#0F284E
Tritanopia (blue-blind)
#2D2732
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331d4f;
/* rgb */ color: rgb(51, 29, 79);
/* oklch */ color: oklch(28.8% 0.089 301.3);
Tailwind
colors: {
  custom: {
    50: '#6d5a81',
    500: '#331d4f',
    950: '#000000',
  },
}
SCSS
$custom: #331d4f;
$custom-light: #6d5a81;
$custom-dark: #000000;
JSON
{
  "hex": "#331d4f",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 79
  },
  "hsl": {
    "h": 266.4,
    "s": 46.296,
    "l": 21.176
  },
  "oklch": {
    "l": 0.28757,
    "c": 0.0891,
    "h": 301.3
  },
  "luminance": 0.02147
}

Semantic roles & 50–950 ramp

primary
#331D4F
secondary
#688444
accent
#D6529C
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331D4F

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

Preview Lab → · Contrast checker → · Palette generator →

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