#331A51#331A51

#331A51 is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.4% C 0.097 H 301.4°. Best body text is #FFFFFF at 14.92:1 contrast (WCAG AA passes).

Color values

HEX#331A51
RGBrgb(51, 26, 81)
HSLhsl(267, 51%, 21%)
HSVhsv(267, 68%, 32%)
CMYKcmyk(37%, 67.9%, 0%, 68.2%)
CIE-LABlab(15.68, 25.23, -29.17)
CIE-LCHlch(15.68, 38.57, 310.86°)
OKLaboklab(28.4% 0.0505 -0.0828)
OKLCHoklch(28.4% 0.097 301.4)
XYZxyz(3.2195, 2.0367, 8.0065)
Luminance0.0204 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A51 #38511A
analogous
#1A1C51 #331A51 #4E1A51
triadic
#331A51 #51331A #1A5133
tetradic
#331A51 #511A1C #38511A #1A514E
square
#331A51 #511A1C #38511A #1A514E
split-complementary
#331A51 #514E1A #1C511A
monochromatic
#0F0717 #160B23 #331A51 #50297F #6D38AE

Accessibility & contrast

On white

14.92
#331A51 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331A51
14.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A51#FFFFFF#000000##FFFFFF
##331A511.0014.921.4114.92
#FFFFFF14.921.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002753
Deuteranopia (green-blind)
#082750
Tritanopia (blue-blind)
#2D2632
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #331a51;
/* rgb */ color: rgb(51, 26, 81);
/* oklch */ color: oklch(28.4% 0.097 301.4);
Tailwind
colors: {
  custom: {
    50: '#6d5882',
    500: '#331a51',
    950: '#000000',
  },
}
SCSS
$custom: #331a51;
$custom-light: #6d5882;
$custom-dark: #000000;
JSON
{
  "hex": "#331a51",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 81
  },
  "hsl": {
    "h": 267.273,
    "s": 51.402,
    "l": 20.98
  },
  "oklch": {
    "l": 0.28395,
    "c": 0.09699,
    "h": 301.4
  },
  "luminance": 0.02037
}

Semantic roles & 50–950 ramp

primary
#331A51
secondary
#678740
accent
#DB4D9A
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331A51

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

Preview Lab → · Contrast checker → · Palette generator →

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