#331E8A#331E8A

#331E8A is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.4% C 0.166 H 282.2°. Best body text is #FFFFFF at 12.40:1 contrast (WCAG AA passes).

Color values

HEX#331E8A
RGBrgb(51, 30, 138)
HSLhsl(252, 64%, 33%)
HSVhsv(252, 78%, 54%)
CMYKcmyk(63%, 78.3%, 0%, 45.9%)
CIE-LABlab(21.82, 40.54, -56.22)
CIE-LCHlch(21.82, 69.31, 305.80°)
OKLaboklab(34.41% 0.035 -0.1621)
OKLCHoklch(34.41% 0.166 282.2)
XYZxyz(6.4155, 3.4669, 24.3709)
Luminance0.0347 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E8A #758A1E
analogous
#1E3F8A #331E8A #691E8A
triadic
#331E8A #8A331E #1E8A33
tetradic
#331E8A #8A1E3F #758A1E #1E8A69
square
#331E8A #8A1E3F #758A1E #1E8A69
split-complementary
#331E8A #8A691E #3F8A1E
monochromatic
#0E0825 #201358 #331E8A #4629BC #664BD8

Accessibility & contrast

On white

12.40
#331E8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#331E8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E8A
12.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E8A#FFFFFF#000000##FFFFFF
##331E8A1.0012.401.6912.40
#FFFFFF12.401.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388D
Deuteranopia (green-blind)
#003088
Tritanopia (blue-blind)
#003D53
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331e8a;
/* rgb */ color: rgb(51, 30, 138);
/* oklch */ color: oklch(34.4% 0.166 282.2);
Tailwind
colors: {
  custom: {
    50: '#775dad',
    500: '#331e8a',
    950: '#000000',
  },
}
SCSS
$custom: #331e8a;
$custom-light: #775dad;
$custom-dark: #000000;
JSON
{
  "hex": "#331e8a",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 138
  },
  "hsl": {
    "h": 251.667,
    "s": 64.286,
    "l": 32.941
  },
  "oklch": {
    "l": 0.34408,
    "c": 0.16587,
    "h": 282.2
  },
  "luminance": 0.03467
}

Semantic roles & 50–950 ramp

primary
#331E8A
secondary
#A4BA4A
accent
#E741C7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331E8A

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

Preview Lab → · Contrast checker → · Palette generator →

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