#331E8C#331E8C

#331E8C is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.6% C 0.168 H 281.8°. Best body text is #FFFFFF at 12.32:1 contrast (WCAG AA passes).

Color values

HEX#331E8C
RGBrgb(51, 30, 140)
HSLhsl(251, 65%, 33%)
HSVhsv(251, 79%, 55%)
CMYKcmyk(63.6%, 78.6%, 0%, 45.1%)
CIE-LABlab(22.04, 41.17, -57.12)
CIE-LCHlch(22.04, 70.41, 305.78°)
OKLaboklab(34.62% 0.0344 -0.1648)
OKLCHoklch(34.62% 0.168 281.8)
XYZxyz(6.5617, 3.5253, 25.1405)
Luminance0.0353 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E8C #778C1E
analogous
#1E408C #331E8C #6A1E8C
triadic
#331E8C #8C331E #1E8C33
tetradic
#331E8C #8C1E40 #778C1E #1E8C6A
square
#331E8C #8C1E40 #778C1E #1E8C6A
split-complementary
#331E8C #8C6A1E #408C1E
monochromatic
#0E0827 #21135A #331E8C #4529BE #674CD9

Accessibility & contrast

On white

12.32
#331E8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.71
#331E8C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E8C
12.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E8C#FFFFFF#000000##FFFFFF
##331E8C1.0012.321.7112.32
#FFFFFF12.321.0021.001.00
#0000001.7121.001.0021.00
##FFFFFF12.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388F
Deuteranopia (green-blind)
#00318A
Tritanopia (blue-blind)
#003E54
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331e8c;
/* rgb */ color: rgb(51, 30, 140);
/* oklch */ color: oklch(34.6% 0.168 281.8);
Tailwind
colors: {
  custom: {
    50: '#775daf',
    500: '#331e8c',
    950: '#000000',
  },
}
SCSS
$custom: #331e8c;
$custom-light: #775daf;
$custom-dark: #000000;
JSON
{
  "hex": "#331e8c",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 140
  },
  "hsl": {
    "h": 251.455,
    "s": 64.706,
    "l": 33.333
  },
  "oklch": {
    "l": 0.34619,
    "c": 0.16833,
    "h": 281.8
  },
  "luminance": 0.03526
}

Semantic roles & 50–950 ramp

primary
#331E8C
secondary
#A6BB4B
accent
#E840C8
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331E8C

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

Preview Lab → · Contrast checker → · Palette generator →

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