#331F4A#331F4A

#331F4A is a dark, moderate violet. Relative luminance 0.022; OKLCH L 28.8% C 0.078 H 303.3°. Best body text is #FFFFFF at 14.63:1 contrast (WCAG AA passes).

Color values

HEX#331F4A
RGBrgb(51, 31, 74)
HSLhsl(268, 41%, 21%)
HSVhsv(268, 58%, 29%)
CMYKcmyk(31.1%, 58.1%, 0%, 71%)
CIE-LABlab(16.40, 19.96, -23.24)
CIE-LCHlch(16.40, 30.63, 310.66°)
OKLaboklab(28.76% 0.043 -0.0654)
OKLCHoklch(28.76% 0.078 303.3)
XYZxyz(3.0910, 2.1782, 6.7348)
Luminance0.0218 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F4A #364A1F
analogous
#1F204A #331F4A #481F4A
triadic
#331F4A #4A331F #1F4A33
tetradic
#331F4A #4A1F20 #364A1F #1F4A48
square
#331F4A #4A1F20 #364A1F #1F4A48
split-complementary
#331F4A #4A481F #204A1F
monochromatic
#0F0916 #150D1F #331F4A #513175 #6E43A0

Accessibility & contrast

On white

14.63
#331F4A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F4A
14.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F4A#FFFFFF#000000##FFFFFF
##331F4A1.0014.631.4414.63
#FFFFFF14.631.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#11284B
Deuteranopia (green-blind)
#172949
Tritanopia (blue-blind)
#2F2731
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331f4a;
/* rgb */ color: rgb(51, 31, 74);
/* oklch */ color: oklch(28.8% 0.078 303.3);
Tailwind
colors: {
  custom: {
    50: '#6c5b7d',
    500: '#331f4a',
    950: '#000000',
  },
}
SCSS
$custom: #331f4a;
$custom-light: #6c5b7d;
$custom-dark: #000000;
JSON
{
  "hex": "#331f4a",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 74
  },
  "hsl": {
    "h": 267.907,
    "s": 40.952,
    "l": 20.588
  },
  "oklch": {
    "l": 0.28759,
    "c": 0.07827,
    "h": 303.3
  },
  "luminance": 0.02178
}

Semantic roles & 50–950 ramp

primary
#331F4A
secondary
#647F46
accent
#D15798
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#070409
muted
#7A797B

Preview Lab

Preview with #331F4A

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

Preview Lab → · Contrast checker → · Palette generator →

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