#331D6B#331D6B

#331D6B is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.2% C 0.128 H 289.9°. Best body text is #FFFFFF at 13.74:1 contrast (WCAG AA passes).

Color values

HEX#331D6B
RGBrgb(51, 29, 107)
HSLhsl(257, 57%, 27%)
HSVhsv(257, 73%, 42%)
CMYKcmyk(52.3%, 72.9%, 0%, 58%)
CIE-LABlab(18.56, 31.36, -41.80)
CIE-LCHlch(18.56, 52.26, 306.88°)
OKLaboklab(31.16% 0.0434 -0.1199)
OKLCHoklch(31.16% 0.128 289.9)
XYZxyz(4.4577, 2.6439, 14.1825)
Luminance0.0264 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D6B #556B1D
analogous
#1D2E6B #331D6B #5A1D6B
triadic
#331D6B #6B331D #1D6B33
tetradic
#331D6B #6B1D2E #556B1D #1D6B5A
square
#331D6B #6B1D2E #556B1D #1D6B5A
split-complementary
#331D6B #6B5A1D #2E6B1D
monochromatic
#0B0718 #1C103B #331D6B #4A2A9B #6239C9

Accessibility & contrast

On white

13.74
#331D6B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#331D6B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D6B
13.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D6B#FFFFFF#000000##FFFFFF
##331D6B1.0013.741.5313.74
#FFFFFF13.741.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F6D
Deuteranopia (green-blind)
#002B69
Tritanopia (blue-blind)
#203141
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331d6b;
/* rgb */ color: rgb(51, 29, 107);
/* oklch */ color: oklch(31.2% 0.128 289.9);
Tailwind
colors: {
  custom: {
    50: '#715b96',
    500: '#331d6b',
    950: '#000000',
  },
}
SCSS
$custom: #331d6b;
$custom-light: #715b96;
$custom-dark: #000000;
JSON
{
  "hex": "#331d6b",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 107
  },
  "hsl": {
    "h": 256.923,
    "s": 57.353,
    "l": 26.667
  },
  "oklch": {
    "l": 0.31163,
    "c": 0.12752,
    "h": 289.9
  },
  "luminance": 0.02644
}

Semantic roles & 50–950 ramp

primary
#331D6B
secondary
#86A044
accent
#E147B5
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331D6B

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

Preview Lab → · Contrast checker → · Palette generator →

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