#331E86#331E86

#331E86 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.0% C 0.161 H 283.0°. Best body text is #FFFFFF at 12.57:1 contrast (WCAG AA passes).

Color values

HEX#331E86
RGBrgb(51, 30, 134)
HSLhsl(252, 63%, 32%)
HSVhsv(252, 78%, 53%)
CMYKcmyk(61.9%, 77.6%, 0%, 47.5%)
CIE-LABlab(21.41, 39.29, -54.40)
CIE-LCHlch(21.41, 67.11, 305.84°)
OKLaboklab(33.99% 0.0361 -0.1568)
OKLCHoklch(33.99% 0.161 283)
XYZxyz(6.1313, 3.3532, 22.8738)
Luminance0.0335 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E86 #71861E
analogous
#1E3D86 #331E86 #671E86
triadic
#331E86 #86331E #1E8633
tetradic
#331E86 #861E3D #71861E #1E8667
square
#331E86 #861E3D #71861E #1E8667
split-complementary
#331E86 #86671E #3D861E
monochromatic
#0D0822 #201354 #331E86 #4629B8 #6548D6

Accessibility & contrast

On white

12.57
#331E86 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#331E86 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E86
12.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E86#FFFFFF#000000##FFFFFF
##331E861.0012.571.6712.57
#FFFFFF12.571.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003789
Deuteranopia (green-blind)
#003084
Tritanopia (blue-blind)
#003C51
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331e86;
/* rgb */ color: rgb(51, 30, 134);
/* oklch */ color: oklch(34.0% 0.161 283.0);
Tailwind
colors: {
  custom: {
    50: '#765daa',
    500: '#331e86',
    950: '#000000',
  },
}
SCSS
$custom: #331e86;
$custom-light: #765daa;
$custom-dark: #000000;
JSON
{
  "hex": "#331e86",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 134
  },
  "hsl": {
    "h": 252.115,
    "s": 63.415,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33989,
    "c": 0.16093,
    "h": 283
  },
  "luminance": 0.03354
}

Semantic roles & 50–950 ramp

primary
#331E86
secondary
#A2B847
accent
#E641C5
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331E86

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

Preview Lab → · Contrast checker → · Palette generator →

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