#331C7C#331C7C

#331C7C is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.7% C 0.151 H 285.5°. Best body text is #FFFFFF at 13.14:1 contrast (WCAG AA passes).

Color values

HEX#331C7C
RGBrgb(51, 28, 124)
HSLhsl(254, 63%, 30%)
HSVhsv(254, 77%, 49%)
CMYKcmyk(58.9%, 77.4%, 0%, 51.4%)
CIE-LABlab(20.00, 37.25, -50.39)
CIE-LCHlch(20.00, 62.66, 306.47°)
OKLaboklab(32.69% 0.0403 -0.1451)
OKLCHoklch(32.69% 0.151 285.5)
XYZxyz(5.4175, 2.9892, 19.3564)
Luminance0.0299 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C7C #657C1C
analogous
#1C357C #331C7C #631C7C
triadic
#331C7C #7C331C #1C7C33
tetradic
#331C7C #7C1C35 #657C1C #1C7C63
square
#331C7C #7C1C35 #657C1C #1C7C63
split-complementary
#331C7C #7C631C #357C1C
monochromatic
#0A0619 #1E114A #331C7C #4827AE #623FD4

Accessibility & contrast

On white

13.14
#331C7C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#331C7C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C7C
13.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C7C#FFFFFF#000000##FFFFFF
##331C7C1.0013.141.6013.14
#FFFFFF13.141.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337F
Deuteranopia (green-blind)
#002D7A
Tritanopia (blue-blind)
#0F374B
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331c7c;
/* rgb */ color: rgb(51, 28, 124);
/* oklch */ color: oklch(32.7% 0.151 285.5);
Tailwind
colors: {
  custom: {
    50: '#745ba3',
    500: '#331c7c',
    950: '#000000',
  },
}
SCSS
$custom: #331c7c;
$custom-light: #745ba3;
$custom-dark: #000000;
JSON
{
  "hex": "#331c7c",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 124
  },
  "hsl": {
    "h": 254.375,
    "s": 63.158,
    "l": 29.804
  },
  "oklch": {
    "l": 0.3269,
    "c": 0.15057,
    "h": 285.5
  },
  "luminance": 0.0299
}

Semantic roles & 50–950 ramp

primary
#331C7C
secondary
#96B044
accent
#E642BF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331C7C

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

Preview Lab → · Contrast checker → · Palette generator →

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