#331B4A#331B4A

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

Color values

HEX#331B4A
RGBrgb(51, 27, 74)
HSLhsl(271, 47%, 20%)
HSVhsv(271, 64%, 29%)
CMYKcmyk(31.1%, 63.5%, 0%, 71%)
CIE-LABlab(15.39, 22.58, -24.84)
CIE-LCHlch(15.39, 33.57, 312.26°)
OKLaboklab(28.02% 0.0492 -0.0701)
OKLCHoklch(28.02% 0.086 305.1)
XYZxyz(2.9929, 1.9821, 6.7021)
Luminance0.0198 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B4A #324A1B
analogous
#1B1B4A #331B4A #4A1B4A
triadic
#331B4A #4A331B #1B4A33
tetradic
#331B4A #4A1B1B #324A1B #1B4A4A
square
#331B4A #4A1B1B #324A1B #1B4A4A
split-complementary
#331B4A #4A4A1B #1B4A1B
monochromatic
#0F0816 #140B1D #331B4A #522B77 #713CA4

Accessibility & contrast

On white

15.04
#331B4A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#331B4A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B4A
15.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B4A#FFFFFF#000000##FFFFFF
##331B4A1.0015.041.4015.04
#FFFFFF15.041.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF15.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#08264C
Deuteranopia (green-blind)
#122749
Tritanopia (blue-blind)
#2F242F
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #331b4a;
/* rgb */ color: rgb(51, 27, 74);
/* oklch */ color: oklch(28.0% 0.086 305.1);
Tailwind
colors: {
  custom: {
    50: '#6d587d',
    500: '#331b4a',
    950: '#000000',
  },
}
SCSS
$custom: #331b4a;
$custom-light: #6d587d;
$custom-dark: #000000;
JSON
{
  "hex": "#331b4a",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 74
  },
  "hsl": {
    "h": 270.638,
    "s": 46.535,
    "l": 19.804
  },
  "oklch": {
    "l": 0.2802,
    "c": 0.08564,
    "h": 305.1
  },
  "luminance": 0.01982
}

Semantic roles & 50–950 ramp

primary
#331B4A
secondary
#608041
accent
#D65292
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#070309
muted
#7A787B

Preview Lab

Preview with #331B4A

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

Preview Lab → · Contrast checker → · Palette generator →

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