#331D4E#331D4E

#331D4E is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.7% C 0.088 H 301.9°. Best body text is #FFFFFF at 14.72:1 contrast (WCAG AA passes).

Color values

HEX#331D4E
RGBrgb(51, 29, 78)
HSLhsl(267, 46%, 21%)
HSVhsv(267, 63%, 31%)
CMYKcmyk(34.6%, 62.8%, 0%, 69.4%)
CIE-LABlab(16.17, 22.45, -26.34)
CIE-LCHlch(16.17, 34.61, 310.44°)
OKLaboklab(28.68% 0.0463 -0.0745)
OKLCHoklch(28.68% 0.088 301.9)
XYZxyz(3.1794, 2.1326, 7.4504)
Luminance0.0213 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D4E #384E1D
analogous
#1D1F4E #331D4E #4B1D4E
triadic
#331D4E #4E331D #1D4E33
tetradic
#331D4E #4E1D1F #384E1D #1D4E4B
square
#331D4E #4E1D1F #384E1D #1D4E4B
split-complementary
#331D4E #4E4B1D #1F4E1D
monochromatic
#0F0816 #160C21 #331D4E #502E7B #6D3EA7

Accessibility & contrast

On white

14.72
#331D4E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#331D4E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D4E
14.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D4E#FFFFFF#000000##FFFFFF
##331D4E1.0014.721.4314.72
#FFFFFF14.721.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#082850
Deuteranopia (green-blind)
#10284D
Tritanopia (blue-blind)
#2E2732
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331d4e;
/* rgb */ color: rgb(51, 29, 78);
/* oklch */ color: oklch(28.7% 0.088 301.9);
Tailwind
colors: {
  custom: {
    50: '#6d5a80',
    500: '#331d4e',
    950: '#000000',
  },
}
SCSS
$custom: #331d4e;
$custom-light: #6d5a80;
$custom-dark: #000000;
JSON
{
  "hex": "#331d4e",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 78
  },
  "hsl": {
    "h": 266.939,
    "s": 45.794,
    "l": 20.98
  },
  "oklch": {
    "l": 0.28681,
    "c": 0.08768,
    "h": 301.9
  },
  "luminance": 0.02133
}

Semantic roles & 50–950 ramp

primary
#331D4E
secondary
#678344
accent
#D5529B
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331D4E

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

Preview Lab → · Contrast checker → · Palette generator →

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