#331C9D#331C9D

#331C9D is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.2% C 0.190 H 279.2°. Best body text is #FFFFFF at 11.71:1 contrast (WCAG AA passes).

Color values

HEX#331C9D
RGBrgb(51, 28, 157)
HSLhsl(251, 70%, 36%)
HSVhsv(251, 82%, 62%)
CMYKcmyk(67.5%, 82.2%, 0%, 38.4%)
CIE-LABlab(23.57, 47.34, -65.09)
CIE-LCHlch(23.57, 80.48, 306.03°)
OKLaboklab(36.24% 0.0305 -0.188)
OKLCHoklch(36.24% 0.19 279.2)
XYZxyz(7.8643, 3.9680, 32.2432)
Luminance0.0397 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C9D #869D1C
analogous
#1C469D #331C9D #741C9D
triadic
#331C9D #9D331C #1C9D33
tetradic
#331C9D #9D1C46 #869D1C #1C9D74
square
#331C9D #9D1C46 #869D1C #1C9D74
split-complementary
#331C9D #9D741C #469D1C
monochromatic
#110935 #221369 #331C9D #4425D1 #6C53E0

Accessibility & contrast

On white

11.71
#331C9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#331C9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C9D
11.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C9D#FFFFFF#000000##FFFFFF
##331C9D1.0011.711.7911.71
#FFFFFF11.711.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003DA1
Deuteranopia (green-blind)
#00339B
Tritanopia (blue-blind)
#00445D
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #331c9d;
/* rgb */ color: rgb(51, 28, 157);
/* oklch */ color: oklch(36.2% 0.190 279.2);
Tailwind
colors: {
  custom: {
    50: '#7b5dbb',
    500: '#331c9d',
    950: '#000000',
  },
}
SCSS
$custom: #331c9d;
$custom-light: #7b5dbb;
$custom-dark: #000000;
JSON
{
  "hex": "#331c9d",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 157
  },
  "hsl": {
    "h": 250.698,
    "s": 69.73,
    "l": 36.275
  },
  "oklch": {
    "l": 0.36237,
    "c": 0.19041,
    "h": 279.2
  },
  "luminance": 0.03969
}

Semantic roles & 50–950 ramp

primary
#331C9D
secondary
#AFC351
accent
#ED3BCD
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #331C9D

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

Preview Lab → · Contrast checker → · Palette generator →

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