#331F3F#331F3F

#331F3F is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.0% C 0.062 H 311.7°. Best body text is #FFFFFF at 14.91:1 contrast (WCAG AA passes).

Color values

HEX#331F3F
RGBrgb(51, 31, 63)
HSLhsl(278, 34%, 18%)
HSVhsv(278, 51%, 25%)
CMYKcmyk(19%, 50.8%, 0%, 75.3%)
CIE-LABlab(15.71, 16.86, -16.71)
CIE-LCHlch(15.71, 23.74, 315.25°)
OKLaboklab(28.03% 0.0414 -0.0464)
OKLCHoklch(28.03% 0.062 311.7)
XYZxyz(2.7523, 2.0427, 4.9510)
Luminance0.0204 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F3F #2B3F1F
analogous
#231F3F #331F3F #3F1F3B
triadic
#331F3F #3F331F #1F3F33
tetradic
#331F3F #3F231F #2B3F1F #1F3B3F
square
#331F3F #3F231F #2B3F1F #1F3B3F
split-complementary
#331F3F #3B3F1F #1F3F23
monochromatic
#110A15 #120B16 #331F3F #543368 #754791

Accessibility & contrast

On white

14.91
#331F3F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F3F
14.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F3F#FFFFFF#000000##FFFFFF
##331F3F1.0014.911.4114.91
#FFFFFF14.911.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.911.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331f3f;
/* rgb */ color: rgb(51, 31, 63);
/* oklch */ color: oklch(28.0% 0.062 311.7);
Tailwind
colors: {
  custom: {
    50: '#6b5b74',
    500: '#331f3f',
    950: '#000000',
  },
}
SCSS
$custom: #331f3f;
$custom-light: #6b5b74;
$custom-dark: #000000;
JSON
{
  "hex": "#331f3f",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 63
  },
  "hsl": {
    "h": 277.5,
    "s": 34.043,
    "l": 18.431
  },
  "oklch": {
    "l": 0.28025,
    "c": 0.0622,
    "h": 311.7
  },
  "luminance": 0.02043
}

Semantic roles & 50–950 ramp

primary
#331F3F
secondary
#577347
accent
#CA5E86
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070408
muted
#7A797B

Preview Lab

Preview with #331F3F

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

Preview Lab → · Contrast checker → · Palette generator →

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