#331A52#331A52

#331A52 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.5% C 0.098 H 300.9°. Best body text is #FFFFFF at 14.89:1 contrast (WCAG AA passes).

Color values

HEX#331A52
RGBrgb(51, 26, 82)
HSLhsl(267, 52%, 21%)
HSVhsv(267, 68%, 32%)
CMYKcmyk(37.8%, 68.3%, 0%, 67.8%)
CIE-LABlab(15.76, 25.53, -29.72)
CIE-LCHlch(15.76, 39.18, 310.65°)
OKLaboklab(28.48% 0.0505 -0.0844)
OKLCHoklch(28.48% 0.098 300.9)
XYZxyz(3.2573, 2.0518, 8.2054)
Luminance0.0205 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A52 #39521A
analogous
#1A1D52 #331A52 #4F1A52
triadic
#331A52 #52331A #1A5233
tetradic
#331A52 #521A1D #39521A #1A524F
square
#331A52 #521A1D #39521A #1A524F
split-complementary
#331A52 #524F1A #1D521A
monochromatic
#0E0717 #160B24 #331A52 #502980 #6D37AF

Accessibility & contrast

On white

14.89
#331A52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#331A52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A52
14.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A52#FFFFFF#000000##FFFFFF
##331A521.0014.891.4114.89
#FFFFFF14.891.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002754
Deuteranopia (green-blind)
#062751
Tritanopia (blue-blind)
#2C2633
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #331a52;
/* rgb */ color: rgb(51, 26, 82);
/* oklch */ color: oklch(28.5% 0.098 300.9);
Tailwind
colors: {
  custom: {
    50: '#6d5883',
    500: '#331a52',
    950: '#000000',
  },
}
SCSS
$custom: #331a52;
$custom-light: #6d5883;
$custom-dark: #000000;
JSON
{
  "hex": "#331a52",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 82
  },
  "hsl": {
    "h": 266.786,
    "s": 51.852,
    "l": 21.176
  },
  "oklch": {
    "l": 0.28477,
    "c": 0.09835,
    "h": 300.9
  },
  "luminance": 0.02052
}

Semantic roles & 50–950 ramp

primary
#331A52
secondary
#688840
accent
#DB4C9C
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331A52

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

Preview Lab → · Contrast checker → · Palette generator →

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