#331C8B#331C8B

#331C8B is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.3% C 0.169 H 282.3°. Best body text is #FFFFFF at 12.50:1 contrast (WCAG AA passes).

Color values

HEX#331C8B
RGBrgb(51, 28, 139)
HSLhsl(252, 66%, 33%)
HSVhsv(252, 80%, 55%)
CMYKcmyk(63.3%, 79.9%, 0%, 45.5%)
CIE-LABlab(21.57, 41.88, -57.26)
CIE-LCHlch(21.57, 70.94, 306.18°)
OKLaboklab(34.26% 0.036 -0.1651)
OKLCHoklch(34.26% 0.169 282.3)
XYZxyz(6.4392, 3.3979, 24.7376)
Luminance0.0340 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C8B #748B1C
analogous
#1C3D8B #331C8B #6A1C8B
triadic
#331C8B #8B331C #1C8B33
tetradic
#331C8B #8B1C3D #748B1C #1C8B6A
square
#331C8B #8B1C3D #748B1C #1C8B6A
split-complementary
#331C8B #8B6A1C #3D8B1C
monochromatic
#0E0725 #201258 #331C8B #4626BE #6647DA

Accessibility & contrast

On white

12.50
#331C8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#331C8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C8B
12.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C8B#FFFFFF#000000##FFFFFF
##331C8B1.0012.501.6812.50
#FFFFFF12.501.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378E
Deuteranopia (green-blind)
#003089
Tritanopia (blue-blind)
#003D53
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331c8b;
/* rgb */ color: rgb(51, 28, 139);
/* oklch */ color: oklch(34.3% 0.169 282.3);
Tailwind
colors: {
  custom: {
    50: '#775cae',
    500: '#331c8b',
    950: '#000000',
  },
}
SCSS
$custom: #331c8b;
$custom-light: #775cae;
$custom-dark: #000000;
JSON
{
  "hex": "#331c8b",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 139
  },
  "hsl": {
    "h": 252.432,
    "s": 66.467,
    "l": 32.745
  },
  "oklch": {
    "l": 0.34263,
    "c": 0.16903,
    "h": 282.3
  },
  "luminance": 0.03398
}

Semantic roles & 50–950 ramp

primary
#331C8B
secondary
#A4BC47
accent
#E93EC6
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331C8B

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

Preview Lab → · Contrast checker → · Palette generator →

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