#331A4F#331A4F

#331A4F is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.2% C 0.094 H 302.5°. Best body text is #FFFFFF at 14.99:1 contrast (WCAG AA passes).

Color values

HEX#331A4F
RGBrgb(51, 26, 79)
HSLhsl(268, 50%, 21%)
HSVhsv(268, 67%, 31%)
CMYKcmyk(35.4%, 67.1%, 0%, 69%)
CIE-LABlab(15.52, 24.65, -28.06)
CIE-LCHlch(15.52, 37.35, 311.30°)
OKLaboklab(28.23% 0.0506 -0.0795)
OKLCHoklch(28.23% 0.094 302.5)
XYZxyz(3.1456, 2.0071, 7.6173)
Luminance0.0201 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A4F #364F1A
analogous
#1A1B4F #331A4F #4D1A4F
triadic
#331A4F #4F331A #1A4F33
tetradic
#331A4F #4F1A1B #364F1A #1A4F4D
square
#331A4F #4F1A1B #364F1A #1A4F4D
split-complementary
#331A4F #4F4D1A #1B4F1A
monochromatic
#0F0817 #150B21 #331A4F #51297D #6E38AB

Accessibility & contrast

On white

14.99
#331A4F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#331A4F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A4F
14.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A4F#FFFFFF#000000##FFFFFF
##331A4F1.0014.991.4014.99
#FFFFFF14.991.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF14.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002651
Deuteranopia (green-blind)
#0B274E
Tritanopia (blue-blind)
#2E2531
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #331a4f;
/* rgb */ color: rgb(51, 26, 79);
/* oklch */ color: oklch(28.2% 0.094 302.5);
Tailwind
colors: {
  custom: {
    50: '#6d5881',
    500: '#331a4f',
    950: '#000000',
  },
}
SCSS
$custom: #331a4f;
$custom-light: #6d5881;
$custom-dark: #000000;
JSON
{
  "hex": "#331a4f",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 79
  },
  "hsl": {
    "h": 268.302,
    "s": 50.476,
    "l": 20.588
  },
  "oklch": {
    "l": 0.28234,
    "c": 0.09426,
    "h": 302.5
  },
  "luminance": 0.02007
}

Semantic roles & 50–950 ramp

primary
#331A4F
secondary
#648540
accent
#DA4E98
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331A4F

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

Preview Lab → · Contrast checker → · Palette generator →

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