#331B86#331B86

#331B86 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.164 H 283.5°. Best body text is #FFFFFF at 12.79:1 contrast (WCAG AA passes).

Color values

HEX#331B86
RGBrgb(51, 27, 134)
HSLhsl(253, 66%, 32%)
HSVhsv(253, 80%, 53%)
CMYKcmyk(61.9%, 79.9%, 0%, 47.5%)
CIE-LABlab(20.86, 40.85, -55.30)
CIE-LCHlch(20.86, 68.75, 306.46°)
OKLaboklab(33.61% 0.0382 -0.1594)
OKLCHoklch(33.61% 0.164 283.5)
XYZxyz(6.0589, 3.2085, 22.8497)
Luminance0.0321 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B86 #6E861B
analogous
#1B3986 #331B86 #691B86
triadic
#331B86 #86331B #1B8633
tetradic
#331B86 #861B39 #6E861B #1B8669
square
#331B86 #861B39 #6E861B #1B8669
split-complementary
#331B86 #86691B #39861B
monochromatic
#0C0620 #201153 #331B86 #4625B9 #6442D9

Accessibility & contrast

On white

12.79
#331B86 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331B86
12.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B86#FFFFFF#000000##FFFFFF
##331B861.0012.791.6412.79
#FFFFFF12.791.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003589
Deuteranopia (green-blind)
#002F84
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331b86;
/* rgb */ color: rgb(51, 27, 134);
/* oklch */ color: oklch(33.6% 0.164 283.5);
Tailwind
colors: {
  custom: {
    50: '#765baa',
    500: '#331b86',
    950: '#000000',
  },
}
SCSS
$custom: #331b86;
$custom-light: #765baa;
$custom-dark: #000000;
JSON
{
  "hex": "#331b86",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 134
  },
  "hsl": {
    "h": 253.458,
    "s": 66.46,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33607,
    "c": 0.16392,
    "h": 283.5
  },
  "luminance": 0.03209
}

Semantic roles & 50–950 ramp

primary
#331B86
secondary
#9FB944
accent
#E93EC3
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331B86

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

Preview Lab → · Contrast checker → · Palette generator →

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