#331B76#331B76

#331B76 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.9% C 0.144 H 287.2°. Best body text is #FFFFFF at 13.47:1 contrast (WCAG AA passes).

Color values

HEX#331B76
RGBrgb(51, 27, 118)
HSLhsl(256, 63%, 28%)
HSVhsv(256, 77%, 46%)
CMYKcmyk(56.8%, 77.1%, 0%, 53.7%)
CIE-LABlab(19.21, 35.93, -47.86)
CIE-LCHlch(19.21, 59.84, 306.90°)
OKLaboklab(31.95% 0.0427 -0.1377)
OKLCHoklch(31.95% 0.144 287.2)
XYZxyz(5.0262, 2.7954, 17.4108)
Luminance0.0280 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B76 #5E761B
analogous
#1B3076 #331B76 #601B76
triadic
#331B76 #76331B #1B7633
tetradic
#331B76 #761B30 #5E761B #1B7660
square
#331B76 #761B30 #5E761B #1B7660
split-complementary
#331B76 #76601B #30761B
monochromatic
#0B0619 #1D1044 #331B76 #4926A8 #623AD2

Accessibility & contrast

On white

13.47
#331B76 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#331B76 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B76
13.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B76#FFFFFF#000000##FFFFFF
##331B761.0013.471.5613.47
#FFFFFF13.471.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003179
Deuteranopia (green-blind)
#002C74
Tritanopia (blue-blind)
#173447
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331b76;
/* rgb */ color: rgb(51, 27, 118);
/* oklch */ color: oklch(31.9% 0.144 287.2);
Tailwind
colors: {
  custom: {
    50: '#735a9e',
    500: '#331b76',
    950: '#000000',
  },
}
SCSS
$custom: #331b76;
$custom-light: #735a9e;
$custom-dark: #000000;
JSON
{
  "hex": "#331b76",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 118
  },
  "hsl": {
    "h": 255.824,
    "s": 62.759,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31946,
    "c": 0.14414,
    "h": 287.2
  },
  "luminance": 0.02796
}

Semantic roles & 50–950 ramp

primary
#331B76
secondary
#8FAA42
accent
#E642BB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331B76

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

Preview Lab → · Contrast checker → · Palette generator →

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