#331D4C#331D4C

#331D4C is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.5% C 0.085 H 303.0°. Best body text is #FFFFFF at 14.78:1 contrast (WCAG AA passes).

Color values

HEX#331D4C
RGBrgb(51, 29, 76)
HSLhsl(268, 45%, 21%)
HSVhsv(268, 62%, 30%)
CMYKcmyk(32.9%, 61.8%, 0%, 70.2%)
CIE-LABlab(16.03, 21.86, -25.20)
CIE-LCHlch(16.03, 33.36, 310.94°)
OKLaboklab(28.53% 0.0462 -0.0711)
OKLCHoklch(28.53% 0.085 303)
XYZxyz(3.1088, 2.1043, 7.0785)
Luminance0.0210 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D4C #364C1D
analogous
#1D1E4C #331D4C #4A1D4C
triadic
#331D4C #4C331D #1D4C33
tetradic
#331D4C #4C1D1E #364C1D #1D4C4A
square
#331D4C #4C1D1E #364C1D #1D4C4A
split-complementary
#331D4C #4C4A1D #1E4C1D
monochromatic
#0F0816 #150C20 #331D4C #512E78 #6E3FA5

Accessibility & contrast

On white

14.78
#331D4C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#331D4C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D4C
14.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D4C#FFFFFF#000000##FFFFFF
##331D4C1.0014.781.4214.78
#FFFFFF14.781.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0A274E
Deuteranopia (green-blind)
#12284B
Tritanopia (blue-blind)
#2E2631
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331d4c;
/* rgb */ color: rgb(51, 29, 76);
/* oklch */ color: oklch(28.5% 0.085 303.0);
Tailwind
colors: {
  custom: {
    50: '#6d5a7e',
    500: '#331d4c',
    950: '#000000',
  },
}
SCSS
$custom: #331d4c;
$custom-light: #6d5a7e;
$custom-dark: #000000;
JSON
{
  "hex": "#331d4c",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 76
  },
  "hsl": {
    "h": 268.085,
    "s": 44.762,
    "l": 20.588
  },
  "oklch": {
    "l": 0.2853,
    "c": 0.08484,
    "h": 303
  },
  "luminance": 0.02104
}

Semantic roles & 50–950 ramp

primary
#331D4C
secondary
#648144
accent
#D45398
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331D4C

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

Preview Lab → · Contrast checker → · Palette generator →

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