#331A81#331A81

#331A81 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.0% C 0.159 H 284.7°. Best body text is #FFFFFF at 13.08:1 contrast (WCAG AA passes).

Color values

HEX#331A81
RGBrgb(51, 26, 129)
HSLhsl(255, 66%, 30%)
HSVhsv(255, 80%, 51%)
CMYKcmyk(60.5%, 79.8%, 0%, 49.4%)
CIE-LABlab(20.15, 39.83, -53.31)
CIE-LCHlch(20.15, 66.55, 306.77°)
OKLaboklab(32.95% 0.0403 -0.1536)
OKLCHoklch(32.95% 0.159 284.7)
XYZxyz(5.6959, 3.0272, 21.0488)
Luminance0.0303 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A81 #68811A
analogous
#1A3481 #331A81 #661A81
triadic
#331A81 #81331A #1A8133
tetradic
#331A81 #811A34 #68811A #1A8166
square
#331A81 #811A34 #68811A #1A8166
split-complementary
#331A81 #81661A #34811A
monochromatic
#0B051B #1F104E #331A81 #4724B4 #633DD8

Accessibility & contrast

On white

13.08
#331A81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331A81
13.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A81#FFFFFF#000000##FFFFFF
##331A811.0013.081.6113.08
#FFFFFF13.081.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.081.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331a81;
/* rgb */ color: rgb(51, 26, 129);
/* oklch */ color: oklch(33.0% 0.159 284.7);
Tailwind
colors: {
  custom: {
    50: '#755aa7',
    500: '#331a81',
    950: '#000000',
  },
}
SCSS
$custom: #331a81;
$custom-light: #755aa7;
$custom-dark: #000000;
JSON
{
  "hex": "#331a81",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 129
  },
  "hsl": {
    "h": 254.563,
    "s": 66.452,
    "l": 30.392
  },
  "oklch": {
    "l": 0.32953,
    "c": 0.15882,
    "h": 284.7
  },
  "luminance": 0.03028
}

Semantic roles & 50–950 ramp

primary
#331A81
secondary
#99B542
accent
#E93EC0
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331A81

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

Preview Lab → · Contrast checker → · Palette generator →

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