#331F4C#331F4C

#331F4C is a dark, moderate violet. Relative luminance 0.022; OKLCH L 28.9% C 0.081 H 302.1°. Best body text is #FFFFFF at 14.57:1 contrast (WCAG AA passes).

Color values

HEX#331F4C
RGBrgb(51, 31, 76)
HSLhsl(267, 42%, 21%)
HSVhsv(267, 59%, 30%)
CMYKcmyk(32.9%, 59.2%, 0%, 70.2%)
CIE-LABlab(16.53, 20.54, -24.39)
CIE-LCHlch(16.53, 31.89, 310.10°)
OKLaboklab(28.9% 0.0431 -0.0688)
OKLCHoklch(28.9% 0.081 302.1)
XYZxyz(3.1594, 2.2056, 7.0953)
Luminance0.0221 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F4C #384C1F
analogous
#1F214C #331F4C #491F4C
triadic
#331F4C #4C331F #1F4C33
tetradic
#331F4C #4C1F21 #384C1F #1F4C49
square
#331F4C #4C1F21 #384C1F #1F4C49
split-complementary
#331F4C #4C491F #214C1F
monochromatic
#0F0916 #160D21 #331F4C #503177 #6D42A3

Accessibility & contrast

On white

14.57
#331F4C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F4C
14.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F4C#FFFFFF#000000##FFFFFF
##331F4C1.0014.571.4414.57
#FFFFFF14.571.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0F294E
Deuteranopia (green-blind)
#15294B
Tritanopia (blue-blind)
#2E2832
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331f4c;
/* rgb */ color: rgb(51, 31, 76);
/* oklch */ color: oklch(28.9% 0.081 302.1);
Tailwind
colors: {
  custom: {
    50: '#6c5b7e',
    500: '#331f4c',
    950: '#000000',
  },
}
SCSS
$custom: #331f4c;
$custom-light: #6c5b7e;
$custom-dark: #000000;
JSON
{
  "hex": "#331f4c",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 76
  },
  "hsl": {
    "h": 266.667,
    "s": 42.056,
    "l": 20.98
  },
  "oklch": {
    "l": 0.28903,
    "c": 0.08119,
    "h": 302.1
  },
  "luminance": 0.02206
}

Semantic roles & 50–950 ramp

primary
#331F4C
secondary
#678146
accent
#D2569B
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331F4C

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

Preview Lab → · Contrast checker → · Palette generator →

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