#331A85#331A85

#331A85 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.164 H 283.8°. Best body text is #FFFFFF at 12.91:1 contrast (WCAG AA passes).

Color values

HEX#331A85
RGBrgb(51, 26, 133)
HSLhsl(254, 67%, 31%)
HSVhsv(254, 80%, 52%)
CMYKcmyk(61.7%, 80.5%, 0%, 47.8%)
CIE-LABlab(20.58, 41.05, -55.13)
CIE-LCHlch(20.58, 68.74, 306.67°)
OKLaboklab(33.38% 0.0391 -0.1589)
OKLCHoklch(33.38% 0.164 283.8)
XYZxyz(5.9670, 3.1357, 22.4766)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A85 #6C851A
analogous
#1A3685 #331A85 #681A85
triadic
#331A85 #85331A #1A8533
tetradic
#331A85 #851A36 #6C851A #1A8568
square
#331A85 #851A36 #6C851A #1A8568
split-complementary
#331A85 #85681A #36851A
monochromatic
#0C061F #1F1052 #331A85 #4724B8 #6440DA

Accessibility & contrast

On white

12.91
#331A85 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#331A85 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A85
12.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A85#FFFFFF#000000##FFFFFF
##331A851.0012.911.6312.91
#FFFFFF12.911.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003588
Deuteranopia (green-blind)
#002E83
Tritanopia (blue-blind)
#003A4F
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331a85;
/* rgb */ color: rgb(51, 26, 133);
/* oklch */ color: oklch(33.4% 0.164 283.8);
Tailwind
colors: {
  custom: {
    50: '#765aaa',
    500: '#331a85',
    950: '#000000',
  },
}
SCSS
$custom: #331a85;
$custom-light: #765aaa;
$custom-dark: #000000;
JSON
{
  "hex": "#331a85",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 133
  },
  "hsl": {
    "h": 254.019,
    "s": 67.296,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33379,
    "c": 0.16367,
    "h": 283.8
  },
  "luminance": 0.03136
}

Semantic roles & 50–950 ramp

primary
#331A85
secondary
#9DB842
accent
#EA3EC2
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331A85

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

Preview Lab → · Contrast checker → · Palette generator →

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