#331E81#331E81

#331E81 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.155 H 284.0°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).

Color values

HEX#331E81
RGBrgb(51, 30, 129)
HSLhsl(253, 62%, 31%)
HSVhsv(253, 77%, 51%)
CMYKcmyk(60.5%, 76.7%, 0%, 49.4%)
CIE-LABlab(20.89, 37.72, -52.09)
CIE-LCHlch(20.89, 64.32, 305.91°)
OKLaboklab(33.47% 0.0374 -0.1501)
OKLCHoklch(33.47% 0.155 284)
XYZxyz(5.7907, 3.2170, 21.0804)
Luminance0.0322 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E81 #6C811E
analogous
#1E3A81 #331E81 #641E81
triadic
#331E81 #81331E #1E8133
tetradic
#331E81 #811E3A #6C811E #1E8164
square
#331E81 #811E3A #6C811E #1E8164
split-complementary
#331E81 #81641E #3A811E
monochromatic
#0C071E #1F124F #331E81 #472AB3 #6446D4

Accessibility & contrast

On white

12.78
#331E81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#331E81 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E81
12.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E81#FFFFFF#000000##FFFFFF
##331E811.0012.781.6412.78
#FFFFFF12.781.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003584
Deuteranopia (green-blind)
#002F7F
Tritanopia (blue-blind)
#043A4E
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331e81;
/* rgb */ color: rgb(51, 30, 129);
/* oklch */ color: oklch(33.5% 0.155 284.0);
Tailwind
colors: {
  custom: {
    50: '#755ca7',
    500: '#331e81',
    950: '#000000',
  },
}
SCSS
$custom: #331e81;
$custom-light: #755ca7;
$custom-dark: #000000;
JSON
{
  "hex": "#331e81",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 129
  },
  "hsl": {
    "h": 252.727,
    "s": 62.264,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33472,
    "c": 0.15468,
    "h": 284
  },
  "luminance": 0.03217
}

Semantic roles & 50–950 ramp

primary
#331E81
secondary
#9DB447
accent
#E542C3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331E81

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

Preview Lab → · Contrast checker → · Palette generator →

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