#331C7E#331C7E

#331C7E is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.9% C 0.153 H 285.0°. Best body text is #FFFFFF at 13.06:1 contrast (WCAG AA passes).

Color values

HEX#331C7E
RGBrgb(51, 28, 126)
HSLhsl(254, 64%, 30%)
HSVhsv(254, 78%, 49%)
CMYKcmyk(59.5%, 77.8%, 0%, 50.6%)
CIE-LABlab(20.20, 37.87, -51.32)
CIE-LCHlch(20.20, 63.78, 306.42°)
OKLaboklab(32.9% 0.0397 -0.1478)
OKLCHoklch(32.9% 0.153 285)
XYZxyz(5.5452, 3.0403, 20.0293)
Luminance0.0304 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C7E #677E1C
analogous
#1C367E #331C7E #641C7E
triadic
#331C7E #7E331C #1C7E33
tetradic
#331C7E #7E1C36 #677E1C #1C7E64
square
#331C7E #7E1C36 #677E1C #1C7E64
split-complementary
#331C7E #7E641C #367E1C
monochromatic
#0A061A #1F114C #331C7E #4727B0 #6340D5

Accessibility & contrast

On white

13.06
#331C7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#331C7E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C7E
13.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C7E#FFFFFF#000000##FFFFFF
##331C7E1.0013.061.6113.06
#FFFFFF13.061.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003381
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#0B384C
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331c7e;
/* rgb */ color: rgb(51, 28, 126);
/* oklch */ color: oklch(32.9% 0.153 285.0);
Tailwind
colors: {
  custom: {
    50: '#745ba4',
    500: '#331c7e',
    950: '#000000',
  },
}
SCSS
$custom: #331c7e;
$custom-light: #745ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#331c7e",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 126
  },
  "hsl": {
    "h": 254.082,
    "s": 63.636,
    "l": 30.196
  },
  "oklch": {
    "l": 0.32896,
    "c": 0.15307,
    "h": 285
  },
  "luminance": 0.03041
}

Semantic roles & 50–950 ramp

primary
#331C7E
secondary
#98B244
accent
#E741C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331C7E

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

Preview Lab → · Contrast checker → · Palette generator →

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