#331C7D#331C7D

#331C7D is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.8% C 0.152 H 285.3°. Best body text is #FFFFFF at 13.10:1 contrast (WCAG AA passes).

Color values

HEX#331C7D
RGBrgb(51, 28, 125)
HSLhsl(254, 63%, 30%)
HSVhsv(254, 78%, 49%)
CMYKcmyk(59.2%, 77.6%, 0%, 51%)
CIE-LABlab(20.10, 37.56, -50.86)
CIE-LCHlch(20.10, 63.22, 306.45°)
OKLaboklab(32.79% 0.04 -0.1464)
OKLCHoklch(32.79% 0.152 285.3)
XYZxyz(5.4810, 3.0147, 19.6911)
Luminance0.0301 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C7D #667D1C
analogous
#1C357D #331C7D #641C7D
triadic
#331C7D #7D331C #1C7D33
tetradic
#331C7D #7D1C35 #667D1C #1C7D64
square
#331C7D #7D1C35 #667D1C #1C7D64
split-complementary
#331C7D #7D641C #357D1C
monochromatic
#0A0619 #1F114B #331C7D #4727AF #633FD4

Accessibility & contrast

On white

13.10
#331C7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331C7D
13.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C7D#FFFFFF#000000##FFFFFF
##331C7D1.0013.101.6013.10
#FFFFFF13.101.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003380
Deuteranopia (green-blind)
#002E7B
Tritanopia (blue-blind)
#0D374B
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331c7d;
/* rgb */ color: rgb(51, 28, 125);
/* oklch */ color: oklch(32.8% 0.152 285.3);
Tailwind
colors: {
  custom: {
    50: '#745ba4',
    500: '#331c7d',
    950: '#000000',
  },
}
SCSS
$custom: #331c7d;
$custom-light: #745ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#331c7d",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 125
  },
  "hsl": {
    "h": 254.227,
    "s": 63.399,
    "l": 30
  },
  "oklch": {
    "l": 0.32793,
    "c": 0.15182,
    "h": 285.3
  },
  "luminance": 0.03015
}

Semantic roles & 50–950 ramp

primary
#331C7D
secondary
#97B144
accent
#E641BF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331C7D

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

Preview Lab → · Contrast checker → · Palette generator →

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