#331E4D#331E4D

#331E4D is a dark, moderate violet. Relative luminance 0.022; OKLCH L 28.8% C 0.084 H 302.0°. Best body text is #FFFFFF at 14.65:1 contrast (WCAG AA passes).

Color values

HEX#331E4D
RGBrgb(51, 30, 77)
HSLhsl(267, 44%, 21%)
HSVhsv(267, 61%, 30%)
CMYKcmyk(33.8%, 61%, 0%, 69.8%)
CIE-LABlab(16.35, 21.50, -25.37)
CIE-LCHlch(16.35, 33.26, 310.28°)
OKLaboklab(28.79% 0.0447 -0.0716)
OKLCHoklch(28.79% 0.084 302)
XYZxyz(3.1688, 2.1682, 7.2713)
Luminance0.0217 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E4D #384D1E
analogous
#1E204D #331E4D #4A1E4D
triadic
#331E4D #4D331E #1E4D33
tetradic
#331E4D #4D1E20 #384D1E #1E4D4A
square
#331E4D #4D1E20 #384D1E #1E4D4A
split-complementary
#331E4D #4D4A1E #204D1E
monochromatic
#0F0916 #160D21 #331E4D #502F79 #6D40A5

Accessibility & contrast

On white

14.65
#331E4D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331E4D
14.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E4D#FFFFFF#000000##FFFFFF
##331E4D1.0014.651.4314.65
#FFFFFF14.651.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0B284F
Deuteranopia (green-blind)
#13284C
Tritanopia (blue-blind)
#2E2732
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331e4d;
/* rgb */ color: rgb(51, 30, 77);
/* oklch */ color: oklch(28.8% 0.084 302.0);
Tailwind
colors: {
  custom: {
    50: '#6d5a7f',
    500: '#331e4d',
    950: '#000000',
  },
}
SCSS
$custom: #331e4d;
$custom-light: #6d5a7f;
$custom-dark: #000000;
JSON
{
  "hex": "#331e4d",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 77
  },
  "hsl": {
    "h": 266.809,
    "s": 43.925,
    "l": 20.98
  },
  "oklch": {
    "l": 0.28789,
    "c": 0.08447,
    "h": 302
  },
  "luminance": 0.02168
}

Semantic roles & 50–950 ramp

primary
#331E4D
secondary
#678245
accent
#D4549B
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331E4D

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

Preview Lab → · Contrast checker → · Palette generator →

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