#331B4D#331B4D

#331B4D is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.2% C 0.090 H 303.2°. Best body text is #FFFFFF at 14.95:1 contrast (WCAG AA passes).

Color values

HEX#331B4D
RGBrgb(51, 27, 77)
HSLhsl(269, 48%, 20%)
HSVhsv(269, 65%, 30%)
CMYKcmyk(33.8%, 64.9%, 0%, 69.8%)
CIE-LABlab(15.61, 23.44, -26.55)
CIE-LCHlch(15.61, 35.42, 311.44°)
OKLaboklab(28.25% 0.0492 -0.0751)
OKLCHoklch(28.25% 0.09 303.2)
XYZxyz(3.0964, 2.0235, 7.2472)
Luminance0.0202 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B4D #354D1B
analogous
#1B1C4D #331B4D #4C1B4D
triadic
#331B4D #4D331B #1B4D33
tetradic
#331B4D #4D1B1C #354D1B #1B4D4C
square
#331B4D #4D1B1C #354D1B #1B4D4C
split-complementary
#331B4D #4D4C1B #1C4D1B
monochromatic
#0F0817 #150B20 #331B4D #512B7A #6F3BA8

Accessibility & contrast

On white

14.95
#331B4D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331B4D
14.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B4D#FFFFFF#000000##FFFFFF
##331B4D1.0014.951.4014.95
#FFFFFF14.951.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF14.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#05264F
Deuteranopia (green-blind)
#0F274C
Tritanopia (blue-blind)
#2E2531
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #331b4d;
/* rgb */ color: rgb(51, 27, 77);
/* oklch */ color: oklch(28.2% 0.090 303.2);
Tailwind
colors: {
  custom: {
    50: '#6d587f',
    500: '#331b4d',
    950: '#000000',
  },
}
SCSS
$custom: #331b4d;
$custom-light: #6d587f;
$custom-dark: #000000;
JSON
{
  "hex": "#331b4d",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 77
  },
  "hsl": {
    "h": 268.8,
    "s": 48.077,
    "l": 20.392
  },
  "oklch": {
    "l": 0.28249,
    "c": 0.0898,
    "h": 303.2
  },
  "luminance": 0.02023
}

Semantic roles & 50–950 ramp

primary
#331B4D
secondary
#638341
accent
#D85097
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331B4D

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

Preview Lab → · Contrast checker → · Palette generator →

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