#331D54#331D54

#331D54 is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.1% C 0.096 H 298.7°. Best body text is #FFFFFF at 14.54:1 contrast (WCAG AA passes).

Color values

HEX#331D54
RGBrgb(51, 29, 84)
HSLhsl(264, 49%, 22%)
HSVhsv(264, 65%, 33%)
CMYKcmyk(39.3%, 65.5%, 0%, 67.1%)
CIE-LABlab(16.61, 24.24, -29.70)
CIE-LCHlch(16.61, 38.33, 309.22°)
OKLaboklab(29.15% 0.0462 -0.0843)
OKLCHoklch(29.15% 0.096 298.7)
XYZxyz(3.4044, 2.2226, 8.6354)
Luminance0.0222 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D54 #3E541D
analogous
#1D2354 #331D54 #4F1D54
triadic
#331D54 #54331D #1D5433
tetradic
#331D54 #541D23 #3E541D #1D544F
square
#331D54 #541D23 #3E541D #1D544F
split-complementary
#331D54 #544F1D #23541D
monochromatic
#0E0817 #170D27 #331D54 #4F2D81 #6A3CAF

Accessibility & contrast

On white

14.54
#331D54 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#331D54 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D54
14.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D54#FFFFFF#000000##FFFFFF
##331D541.0014.541.4414.54
#FFFFFF14.541.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002956
Deuteranopia (green-blind)
#082953
Tritanopia (blue-blind)
#2C2935
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331d54;
/* rgb */ color: rgb(51, 29, 84);
/* oklch */ color: oklch(29.1% 0.096 298.7);
Tailwind
colors: {
  custom: {
    50: '#6d5a84',
    500: '#331d54',
    950: '#000000',
  },
}
SCSS
$custom: #331d54;
$custom-light: #6d5a84;
$custom-dark: #000000;
JSON
{
  "hex": "#331d54",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 84
  },
  "hsl": {
    "h": 264,
    "s": 48.673,
    "l": 22.157
  },
  "oklch": {
    "l": 0.2915,
    "c": 0.09616,
    "h": 298.7
  },
  "luminance": 0.02223
}

Semantic roles & 50–950 ramp

primary
#331D54
secondary
#6D8944
accent
#D850A2
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331D54

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

Preview Lab → · Contrast checker → · Palette generator →

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