#331D52#331D52

#331D52 is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.0% C 0.093 H 299.7°. Best body text is #FFFFFF at 14.60:1 contrast (WCAG AA passes).

Color values

HEX#331D52
RGBrgb(51, 29, 82)
HSLhsl(265, 48%, 22%)
HSVhsv(265, 65%, 32%)
CMYKcmyk(37.8%, 64.6%, 0%, 67.8%)
CIE-LABlab(16.46, 23.64, -28.59)
CIE-LCHlch(16.46, 37.09, 309.58°)
OKLaboklab(28.99% 0.0463 -0.0811)
OKLCHoklch(28.99% 0.093 299.7)
XYZxyz(3.3272, 2.1917, 8.2288)
Luminance0.0219 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D52 #3C521D
analogous
#1D2252 #331D52 #4E1D52
triadic
#331D52 #52331D #1D5233
tetradic
#331D52 #521D22 #3C521D #1D524E
square
#331D52 #521D22 #3C521D #1D524E
split-complementary
#331D52 #524E1D #22521D
monochromatic
#0E0817 #170D25 #331D52 #4F2D7F #6B3DAC

Accessibility & contrast

On white

14.60
#331D52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331D52
14.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D52#FFFFFF#000000##FFFFFF
##331D521.0014.601.4414.60
#FFFFFF14.601.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#022954
Deuteranopia (green-blind)
#0B2851
Tritanopia (blue-blind)
#2C2834
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331d52;
/* rgb */ color: rgb(51, 29, 82);
/* oklch */ color: oklch(29.0% 0.093 299.7);
Tailwind
colors: {
  custom: {
    50: '#6d5a83',
    500: '#331d52',
    950: '#000000',
  },
}
SCSS
$custom: #331d52;
$custom-light: #6d5a83;
$custom-dark: #000000;
JSON
{
  "hex": "#331d52",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 82
  },
  "hsl": {
    "h": 264.906,
    "s": 47.748,
    "l": 21.765
  },
  "oklch": {
    "l": 0.28991,
    "c": 0.09334,
    "h": 299.7
  },
  "luminance": 0.02192
}

Semantic roles & 50–950 ramp

primary
#331D52
secondary
#6B8744
accent
#D7509F
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331D52

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

Preview Lab → · Contrast checker → · Palette generator →

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