#331D42#331D42

#331D42 is a dark, moderate violet. Relative luminance 0.020; OKLCH L 27.8% C 0.071 H 310.0°. Best body text is #FFFFFF at 15.05:1 contrast (WCAG AA passes).

Color values

HEX#331D42
RGBrgb(51, 29, 66)
HSLhsl(276, 39%, 19%)
HSVhsv(276, 56%, 26%)
CMYKcmyk(22.7%, 56.1%, 0%, 74.1%)
CIE-LABlab(15.36, 19.02, -19.36)
CIE-LCHlch(15.36, 27.14, 314.50°)
OKLaboklab(27.82% 0.0454 -0.0541)
OKLCHoklch(27.82% 0.071 310)
XYZxyz(2.7878, 1.9759, 5.3877)
Luminance0.0198 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D42 #2C421D
analogous
#201D42 #331D42 #421D3E
triadic
#331D42 #42331D #1D4233
tetradic
#331D42 #42201D #2C421D #1D3E42
square
#331D42 #42201D #2C421D #1D3E42
split-complementary
#331D42 #3E421D #1D4220
monochromatic
#100915 #120A17 #331D42 #54306D #754297

Accessibility & contrast

On white

15.05
#331D42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#331D42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D42
15.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D42#FFFFFF#000000##FFFFFF
##331D421.0015.051.4015.05
#FFFFFF15.051.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF15.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#142543
Deuteranopia (green-blind)
#1A2741
Tritanopia (blue-blind)
#31232C
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #331d42;
/* rgb */ color: rgb(51, 29, 66);
/* oklch */ color: oklch(27.8% 0.071 310.0);
Tailwind
colors: {
  custom: {
    50: '#6c5976',
    500: '#331d42',
    950: '#000000',
  },
}
SCSS
$custom: #331d42;
$custom-light: #6c5976;
$custom-dark: #000000;
JSON
{
  "hex": "#331d42",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 66
  },
  "hsl": {
    "h": 275.676,
    "s": 38.947,
    "l": 18.627
  },
  "oklch": {
    "l": 0.27823,
    "c": 0.07058,
    "h": 310
  },
  "luminance": 0.01976
}

Semantic roles & 50–950 ramp

primary
#331D42
secondary
#597744
accent
#CF5989
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070308
muted
#7A787B

Preview Lab

Preview with #331D42

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

Preview Lab → · Contrast checker → · Palette generator →

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