#331D7F#331D7F

#331D7F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.1% C 0.153 H 284.6°. Best body text is #FFFFFF at 12.94:1 contrast (WCAG AA passes).

Color values

HEX#331D7F
RGBrgb(51, 29, 127)
HSLhsl(253, 63%, 31%)
HSVhsv(253, 77%, 50%)
CMYKcmyk(59.8%, 77.2%, 0%, 50.2%)
CIE-LABlab(20.50, 37.64, -51.48)
CIE-LCHlch(20.50, 63.77, 306.18°)
OKLaboklab(33.13% 0.0387 -0.1483)
OKLCHoklch(33.13% 0.153 284.6)
XYZxyz(5.6342, 3.1145, 20.3788)
Luminance0.0312 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D7F #697F1D
analogous
#1D387F #331D7F #641D7F
triadic
#331D7F #7F331D #1D7F33
tetradic
#331D7F #7F1D38 #697F1D #1D7F64
square
#331D7F #7F1D38 #697F1D #1D7F64
split-complementary
#331D7F #7F641D #387F1D
monochromatic
#0B061B #1F124D #331D7F #4728B1 #6342D4

Accessibility & contrast

On white

12.94
#331D7F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#331D7F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D7F
12.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D7F#FFFFFF#000000##FFFFFF
##331D7F1.0012.941.6212.94
#FFFFFF12.941.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.941.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: #331d7f;
/* rgb */ color: rgb(51, 29, 127);
/* oklch */ color: oklch(33.1% 0.153 284.6);
Tailwind
colors: {
  custom: {
    50: '#755ca5',
    500: '#331d7f',
    950: '#000000',
  },
}
SCSS
$custom: #331d7f;
$custom-light: #755ca5;
$custom-dark: #000000;
JSON
{
  "hex": "#331d7f",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 127
  },
  "hsl": {
    "h": 253.469,
    "s": 62.821,
    "l": 30.588
  },
  "oklch": {
    "l": 0.33132,
    "c": 0.15325,
    "h": 284.6
  },
  "luminance": 0.03115
}

Semantic roles & 50–950 ramp

primary
#331D7F
secondary
#9AB245
accent
#E642C1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331D7F

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

Preview Lab → · Contrast checker → · Palette generator →

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