#331C82#331C82

#331C82 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.3% C 0.158 H 284.1°. Best body text is #FFFFFF at 12.89:1 contrast (WCAG AA passes).

Color values

HEX#331C82
RGBrgb(51, 28, 130)
HSLhsl(254, 65%, 31%)
HSVhsv(254, 78%, 51%)
CMYKcmyk(60.8%, 78.5%, 0%, 49%)
CIE-LABlab(20.62, 39.11, -53.18)
CIE-LCHlch(20.62, 66.01, 306.33°)
OKLaboklab(33.31% 0.0386 -0.1532)
OKLCHoklch(33.31% 0.158 284.1)
XYZxyz(5.8085, 3.1456, 21.4159)
Luminance0.0315 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C82 #6B821C
analogous
#1C3882 #331C82 #661C82
triadic
#331C82 #82331C #1C8233
tetradic
#331C82 #821C38 #6B821C #1C8266
square
#331C82 #821C38 #6B821C #1C8266
split-complementary
#331C82 #82661C #38821C
monochromatic
#0B061D #1F1150 #331C82 #4727B4 #6442D6

Accessibility & contrast

On white

12.89
#331C82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#331C82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C82
12.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C82#FFFFFF#000000##FFFFFF
##331C821.0012.891.6312.89
#FFFFFF12.891.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003585
Deuteranopia (green-blind)
#002E80
Tritanopia (blue-blind)
#03394E
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331c82;
/* rgb */ color: rgb(51, 28, 130);
/* oklch */ color: oklch(33.3% 0.158 284.1);
Tailwind
colors: {
  custom: {
    50: '#755ba7',
    500: '#331c82',
    950: '#000000',
  },
}
SCSS
$custom: #331c82;
$custom-light: #755ba7;
$custom-dark: #000000;
JSON
{
  "hex": "#331c82",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 130
  },
  "hsl": {
    "h": 253.529,
    "s": 64.557,
    "l": 30.98
  },
  "oklch": {
    "l": 0.3331,
    "c": 0.15803,
    "h": 284.1
  },
  "luminance": 0.03146
}

Semantic roles & 50–950 ramp

primary
#331C82
secondary
#9CB544
accent
#E840C2
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331C82

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

Preview Lab → · Contrast checker → · Palette generator →

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