#331C7F#331C7F

#331C7F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.0% C 0.154 H 284.8°. Best body text is #FFFFFF at 13.02:1 contrast (WCAG AA passes).

Color values

HEX#331C7F
RGBrgb(51, 28, 127)
HSLhsl(254, 64%, 30%)
HSVhsv(254, 78%, 50%)
CMYKcmyk(59.8%, 78%, 0%, 50.2%)
CIE-LABlab(20.31, 38.18, -51.79)
CIE-LCHlch(20.31, 64.34, 306.40°)
OKLaboklab(33% 0.0395 -0.1492)
OKLCHoklch(33% 0.154 284.8)
XYZxyz(5.6101, 3.0663, 20.3708)
Luminance0.0307 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C7F #687F1C
analogous
#1C377F #331C7F #641C7F
triadic
#331C7F #7F331C #1C7F33
tetradic
#331C7F #7F1C37 #687F1C #1C7F64
square
#331C7F #7F1C37 #687F1C #1C7F64
split-complementary
#331C7F #7F641C #377F1C
monochromatic
#0B061B #1F114D #331C7F #4727B1 #6340D5

Accessibility & contrast

On white

13.02
#331C7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331C7F
13.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C7F#FFFFFF#000000##FFFFFF
##331C7F1.0013.021.6113.02
#FFFFFF13.021.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003482
Deuteranopia (green-blind)
#002E7D
Tritanopia (blue-blind)
#09384C
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331c7f;
/* rgb */ color: rgb(51, 28, 127);
/* oklch */ color: oklch(33.0% 0.154 284.8);
Tailwind
colors: {
  custom: {
    50: '#755ba5',
    500: '#331c7f',
    950: '#000000',
  },
}
SCSS
$custom: #331c7f;
$custom-light: #755ba5;
$custom-dark: #000000;
JSON
{
  "hex": "#331c7f",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 127
  },
  "hsl": {
    "h": 253.939,
    "s": 63.871,
    "l": 30.392
  },
  "oklch": {
    "l": 0.32999,
    "c": 0.15431,
    "h": 284.8
  },
  "luminance": 0.03067
}

Semantic roles & 50–950 ramp

primary
#331C7F
secondary
#99B344
accent
#E741C0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331C7F

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

Preview Lab → · Contrast checker → · Palette generator →

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