#331A4C#331A4C

#331A4C is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.0% C 0.090 H 304.2°. Best body text is #FFFFFF at 15.08:1 contrast (WCAG AA passes).

Color values

HEX#331A4C
RGBrgb(51, 26, 76)
HSLhsl(270, 49%, 20%)
HSVhsv(270, 66%, 30%)
CMYKcmyk(32.9%, 65.8%, 0%, 70.2%)
CIE-LABlab(15.30, 23.78, -26.37)
CIE-LCHlch(15.30, 35.51, 312.05°)
OKLaboklab(28% 0.0507 -0.0745)
OKLCHoklch(28% 0.09 304.2)
XYZxyz(3.0389, 1.9644, 7.0552)
Luminance0.0196 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A4C #334C1A
analogous
#1A1A4C #331A4C #4C1A4C
triadic
#331A4C #4C331A #1A4C33
tetradic
#331A4C #4C1A1A #334C1A #1A4C4C
square
#331A4C #4C1A1A #334C1A #1A4C4C
split-complementary
#331A4C #4C4C1A #1A4C1A
monochromatic
#0F0817 #140A1E #331A4C #522A7A #7039A7

Accessibility & contrast

On white

15.08
#331A4C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.39
#331A4C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A4C
15.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A4C#FFFFFF#000000##FFFFFF
##331A4C1.0015.081.3915.08
#FFFFFF15.081.0021.001.00
#0000001.3921.001.0021.00
##FFFFFF15.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#04264E
Deuteranopia (green-blind)
#0E264B
Tritanopia (blue-blind)
#2E2430
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #331a4c;
/* rgb */ color: rgb(51, 26, 76);
/* oklch */ color: oklch(28.0% 0.090 304.2);
Tailwind
colors: {
  custom: {
    50: '#6d587e',
    500: '#331a4c',
    950: '#000000',
  },
}
SCSS
$custom: #331a4c;
$custom-light: #6d587e;
$custom-dark: #000000;
JSON
{
  "hex": "#331a4c",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 76
  },
  "hsl": {
    "h": 270,
    "s": 49.02,
    "l": 20
  },
  "oklch": {
    "l": 0.27998,
    "c": 0.09017,
    "h": 304.2
  },
  "luminance": 0.01964
}

Semantic roles & 50–950 ramp

primary
#331A4C
secondary
#618240
accent
#D94F94
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331A4C

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

Preview Lab → · Contrast checker → · Palette generator →

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