#331C8D#331C8D

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

Color values

HEX#331C8D
RGBrgb(51, 28, 141)
HSLhsl(252, 67%, 33%)
HSVhsv(252, 80%, 55%)
CMYKcmyk(63.8%, 80.1%, 0%, 44.7%)
CIE-LABlab(21.79, 42.50, -58.15)
CIE-LCHlch(21.79, 72.02, 306.16°)
OKLaboklab(34.48% 0.0354 -0.1677)
OKLCHoklch(34.48% 0.171 281.9)
XYZxyz(6.5867, 3.4569, 25.5143)
Luminance0.0346 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C8D #768D1C
analogous
#1C3E8D #331C8D #6B1C8D
triadic
#331C8D #8D331C #1C8D33
tetradic
#331C8D #8D1C3E #768D1C #1C8D6B
square
#331C8D #8D1C3E #768D1C #1C8D6B
split-complementary
#331C8D #8D6B1C #3E8D1C
monochromatic
#0E0827 #21125A #331C8D #4526C0 #6649DB

Accessibility & contrast

On white

12.42
#331C8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331C8D
12.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C8D#FFFFFF#000000##FFFFFF
##331C8D1.0012.421.6912.42
#FFFFFF12.421.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003890
Deuteranopia (green-blind)
#00308B
Tritanopia (blue-blind)
#003E54
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331c8d;
/* rgb */ color: rgb(51, 28, 141);
/* oklch */ color: oklch(34.5% 0.171 281.9);
Tailwind
colors: {
  custom: {
    50: '#775caf',
    500: '#331c8d',
    950: '#000000',
  },
}
SCSS
$custom: #331c8d;
$custom-light: #775caf;
$custom-dark: #000000;
JSON
{
  "hex": "#331c8d",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 141
  },
  "hsl": {
    "h": 252.212,
    "s": 66.864,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34479,
    "c": 0.17144,
    "h": 281.9
  },
  "luminance": 0.03457
}

Semantic roles & 50–950 ramp

primary
#331C8D
secondary
#A5BD48
accent
#EA3EC7
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331C8D

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

Preview Lab → · Contrast checker → · Palette generator →

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