#331E8F#331E8F

#331E8F is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.9% C 0.172 H 281.3°. Best body text is #FFFFFF at 12.19:1 contrast (WCAG AA passes).

Color values

HEX#331E8F
RGBrgb(51, 30, 143)
HSLhsl(251, 65%, 34%)
HSVhsv(251, 79%, 56%)
CMYKcmyk(64.3%, 79%, 0%, 43.9%)
CIE-LABlab(22.36, 42.10, -58.46)
CIE-LCHlch(22.36, 72.04, 305.76°)
OKLaboklab(34.94% 0.0336 -0.1687)
OKLCHoklch(34.94% 0.172 281.3)
XYZxyz(6.7859, 3.6150, 26.3214)
Luminance0.0362 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E8F #7A8F1E
analogous
#1E428F #331E8F #6C1E8F
triadic
#331E8F #8F331E #1E8F33
tetradic
#331E8F #8F1E42 #7A8F1E #1E8F6C
square
#331E8F #8F1E42 #7A8F1E #1E8F6C
split-complementary
#331E8F #8F6C1E #428F1E
monochromatic
#0F092A #21135C #331E8F #4529C2 #684EDA

Accessibility & contrast

On white

12.19
#331E8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#331E8F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E8F
12.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E8F#FFFFFF#000000##FFFFFF
##331E8F1.0012.191.7212.19
#FFFFFF12.191.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003992
Deuteranopia (green-blind)
#00318D
Tritanopia (blue-blind)
#003F56
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331e8f;
/* rgb */ color: rgb(51, 30, 143);
/* oklch */ color: oklch(34.9% 0.172 281.3);
Tailwind
colors: {
  custom: {
    50: '#785db1',
    500: '#331e8f',
    950: '#000000',
  },
}
SCSS
$custom: #331e8f;
$custom-light: #785db1;
$custom-dark: #000000;
JSON
{
  "hex": "#331e8f",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 143
  },
  "hsl": {
    "h": 251.15,
    "s": 65.318,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34939,
    "c": 0.17199,
    "h": 281.3
  },
  "luminance": 0.03616
}

Semantic roles & 50–950 ramp

primary
#331E8F
secondary
#A8BC4C
accent
#E840C9
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331E8F

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

Preview Lab → · Contrast checker → · Palette generator →

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