#331E8B#331E8B

#331E8B is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.5% C 0.167 H 282.0°. Best body text is #FFFFFF at 12.36:1 contrast (WCAG AA passes).

Color values

HEX#331E8B
RGBrgb(51, 30, 139)
HSLhsl(252, 64%, 33%)
HSVhsv(252, 78%, 55%)
CMYKcmyk(63.3%, 78.4%, 0%, 45.5%)
CIE-LABlab(21.93, 40.86, -56.67)
CIE-LCHlch(21.93, 69.86, 305.79°)
OKLaboklab(34.51% 0.0347 -0.1635)
OKLCHoklch(34.51% 0.167 282)
XYZxyz(6.4883, 3.4960, 24.7540)
Luminance0.0350 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E8B #768B1E
analogous
#1E3F8B #331E8B #691E8B
triadic
#331E8B #8B331E #1E8B33
tetradic
#331E8B #8B1E3F #768B1E #1E8B69
square
#331E8B #8B1E3F #768B1E #1E8B69
split-complementary
#331E8B #8B691E #3F8B1E
monochromatic
#0E0826 #211359 #331E8B #4529BD #664BD8

Accessibility & contrast

On white

12.36
#331E8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#331E8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E8B
12.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E8B#FFFFFF#000000##FFFFFF
##331E8B1.0012.361.7012.36
#FFFFFF12.361.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388E
Deuteranopia (green-blind)
#003189
Tritanopia (blue-blind)
#003E54
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331e8b;
/* rgb */ color: rgb(51, 30, 139);
/* oklch */ color: oklch(34.5% 0.167 282.0);
Tailwind
colors: {
  custom: {
    50: '#775dae',
    500: '#331e8b',
    950: '#000000',
  },
}
SCSS
$custom: #331e8b;
$custom-light: #775dae;
$custom-dark: #000000;
JSON
{
  "hex": "#331e8b",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 139
  },
  "hsl": {
    "h": 251.56,
    "s": 64.497,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34514,
    "c": 0.16709,
    "h": 282
  },
  "luminance": 0.03496
}

Semantic roles & 50–950 ramp

primary
#331E8B
secondary
#A5BB4A
accent
#E740C7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331E8B

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

Preview Lab → · Contrast checker → · Palette generator →

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