#331B81#331B81

#331B81 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.1% C 0.158 H 284.5°. Best body text is #FFFFFF at 13.01:1 contrast (WCAG AA passes).

Color values

HEX#331B81
RGBrgb(51, 27, 129)
HSLhsl(254, 65%, 31%)
HSVhsv(254, 79%, 51%)
CMYKcmyk(60.5%, 79.1%, 0%, 49.4%)
CIE-LABlab(20.33, 39.32, -53.02)
CIE-LCHlch(20.33, 66.01, 306.56°)
OKLaboklab(33.08% 0.0396 -0.1528)
OKLCHoklch(33.08% 0.158 284.5)
XYZxyz(5.7184, 3.0723, 21.0563)
Luminance0.0307 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B81 #69811B
analogous
#1B3681 #331B81 #661B81
triadic
#331B81 #81331B #1B8133
tetradic
#331B81 #811B36 #69811B #1B8166
square
#331B81 #811B36 #69811B #1B8166
split-complementary
#331B81 #81661B #36811B
monochromatic
#0B061C #1F104E #331B81 #4726B4 #633FD7

Accessibility & contrast

On white

13.01
#331B81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#331B81 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B81
13.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B81#FFFFFF#000000##FFFFFF
##331B811.0013.011.6113.01
#FFFFFF13.011.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003484
Deuteranopia (green-blind)
#002E7F
Tritanopia (blue-blind)
#05384D
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331b81;
/* rgb */ color: rgb(51, 27, 129);
/* oklch */ color: oklch(33.1% 0.158 284.5);
Tailwind
colors: {
  custom: {
    50: '#755ba7',
    500: '#331b81',
    950: '#000000',
  },
}
SCSS
$custom: #331b81;
$custom-light: #755ba7;
$custom-dark: #000000;
JSON
{
  "hex": "#331b81",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 129
  },
  "hsl": {
    "h": 254.118,
    "s": 65.385,
    "l": 30.588
  },
  "oklch": {
    "l": 0.33078,
    "c": 0.15782,
    "h": 284.5
  },
  "luminance": 0.03073
}

Semantic roles & 50–950 ramp

primary
#331B81
secondary
#9AB543
accent
#E83FC1
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331B81

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

Preview Lab → · Contrast checker → · Palette generator →

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