#331D8C#331D8C

#331D8C is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.5% C 0.169 H 282.0°. Best body text is #FFFFFF at 12.39:1 contrast (WCAG AA passes).

Color values

HEX#331D8C
RGBrgb(51, 29, 140)
HSLhsl(252, 66%, 33%)
HSVhsv(252, 79%, 55%)
CMYKcmyk(63.6%, 79.3%, 0%, 45.1%)
CIE-LABlab(21.86, 41.68, -57.42)
CIE-LCHlch(21.86, 70.95, 305.98°)
OKLaboklab(34.49% 0.0351 -0.1656)
OKLCHoklch(34.49% 0.169 282)
XYZxyz(6.5367, 3.4755, 25.1322)
Luminance0.0348 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D8C #768C1D
analogous
#1D3E8C #331D8C #6A1D8C
triadic
#331D8C #8C331D #1D8C33
tetradic
#331D8C #8C1D3E #768C1D #1D8C6A
square
#331D8C #8C1D3E #768C1D #1D8C6A
split-complementary
#331D8C #8C6A1D #3E8C1D
monochromatic
#0E0827 #211259 #331D8C #4528BF #664AD9

Accessibility & contrast

On white

12.39
#331D8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#331D8C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D8C
12.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D8C#FFFFFF#000000##FFFFFF
##331D8C1.0012.391.7012.39
#FFFFFF12.391.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388F
Deuteranopia (green-blind)
#00308A
Tritanopia (blue-blind)
#003E54
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331d8c;
/* rgb */ color: rgb(51, 29, 140);
/* oklch */ color: oklch(34.5% 0.169 282.0);
Tailwind
colors: {
  custom: {
    50: '#775daf',
    500: '#331d8c',
    950: '#000000',
  },
}
SCSS
$custom: #331d8c;
$custom-light: #775daf;
$custom-dark: #000000;
JSON
{
  "hex": "#331d8c",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 140
  },
  "hsl": {
    "h": 251.892,
    "s": 65.68,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34494,
    "c": 0.16929,
    "h": 282
  },
  "luminance": 0.03476
}

Semantic roles & 50–950 ramp

primary
#331D8C
secondary
#A5BC49
accent
#E93FC7
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331D8C

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

Preview Lab → · Contrast checker → · Palette generator →

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