#331F40#331F40

#331F40 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.1% C 0.064 H 310.8°. Best body text is #FFFFFF at 14.89:1 contrast (WCAG AA passes).

Color values

HEX#331F40
RGBrgb(51, 31, 64)
HSLhsl(276, 35%, 19%)
HSVhsv(276, 52%, 25%)
CMYKcmyk(20.3%, 51.6%, 0%, 74.9%)
CIE-LABlab(15.77, 17.13, -17.32)
CIE-LCHlch(15.77, 24.36, 314.69°)
OKLaboklab(28.09% 0.0416 -0.0482)
OKLCHoklch(28.09% 0.064 310.8)
XYZxyz(2.7805, 2.0540, 5.0995)
Luminance0.0205 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F40 #2C401F
analogous
#221F40 #331F40 #401F3C
triadic
#331F40 #40331F #1F4033
tetradic
#331F40 #40221F #2C401F #1F3C40
square
#331F40 #40221F #2C401F #1F3C40
split-complementary
#331F40 #3C401F #1F4022
monochromatic
#100A15 #120B17 #331F40 #543369 #754792

Accessibility & contrast

On white

14.89
#331F40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#331F40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F40
14.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F40#FFFFFF#000000##FFFFFF
##331F401.0014.891.4114.89
#FFFFFF14.891.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#182641
Deuteranopia (green-blind)
#1D283F
Tritanopia (blue-blind)
#32242C
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #331f40;
/* rgb */ color: rgb(51, 31, 64);
/* oklch */ color: oklch(28.1% 0.064 310.8);
Tailwind
colors: {
  custom: {
    50: '#6b5b75',
    500: '#331f40',
    950: '#000000',
  },
}
SCSS
$custom: #331f40;
$custom-light: #6b5b75;
$custom-dark: #000000;
JSON
{
  "hex": "#331f40",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 64
  },
  "hsl": {
    "h": 276.364,
    "s": 34.737,
    "l": 18.627
  },
  "oklch": {
    "l": 0.28087,
    "c": 0.06365,
    "h": 310.8
  },
  "luminance": 0.02054
}

Semantic roles & 50–950 ramp

primary
#331F40
secondary
#597447
accent
#CB5D88
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070408
muted
#7A797B

Preview Lab

Preview with #331F40

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

Preview Lab → · Contrast checker → · Palette generator →

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