#331A40#331A40

#331A40 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.1% C 0.074 H 312.9°. Best body text is #FFFFFF at 15.41:1 contrast (WCAG AA passes).

Color values

HEX#331A40
RGBrgb(51, 26, 64)
HSLhsl(279, 42%, 18%)
HSVhsv(279, 59%, 25%)
CMYKcmyk(20.3%, 59.4%, 0%, 74.9%)
CIE-LABlab(14.47, 20.46, -19.36)
CIE-LCHlch(14.47, 28.17, 316.57°)
OKLaboklab(27.13% 0.0502 -0.0541)
OKLCHoklch(27.13% 0.074 312.9)
XYZxyz(2.6599, 1.8128, 5.0593)
Luminance0.0181 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A40 #27401A
analogous
#201A40 #331A40 #401A3A
triadic
#331A40 #40331A #1A4033
tetradic
#331A40 #40201A #27401A #1A3A40
square
#331A40 #40201A #27401A #1A3A40
split-complementary
#331A40 #3A401A #1A4020
monochromatic
#110916 #110916 #331A40 #562C6C #783D97

Accessibility & contrast

On white

15.41
#331A40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#331A40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A40
15.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A40#FFFFFF#000000##FFFFFF
##331A401.0015.411.3615.41
#FFFFFF15.411.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#112341
Deuteranopia (green-blind)
#18253F
Tritanopia (blue-blind)
#32202A
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #331a40;
/* rgb */ color: rgb(51, 26, 64);
/* oklch */ color: oklch(27.1% 0.074 312.9);
Tailwind
colors: {
  custom: {
    50: '#6c5775',
    500: '#331a40',
    950: '#000000',
  },
}
SCSS
$custom: #331a40;
$custom-light: #6c5775;
$custom-dark: #000000;
JSON
{
  "hex": "#331a40",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 64
  },
  "hsl": {
    "h": 279.474,
    "s": 42.222,
    "l": 17.647
  },
  "oklch": {
    "l": 0.27125,
    "c": 0.07375,
    "h": 312.9
  },
  "luminance": 0.01813
}

Semantic roles & 50–950 ramp

primary
#331A40
secondary
#527640
accent
#D25680
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070308
muted
#7A787B

Preview Lab

Preview with #331A40

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

Preview Lab → · Contrast checker → · Palette generator →

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