#331A42#331A42

#331A42 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.3% C 0.076 H 311.2°. Best body text is #FFFFFF at 15.36:1 contrast (WCAG AA passes).

Color values

HEX#331A42
RGBrgb(51, 26, 66)
HSLhsl(278, 43%, 18%)
HSVhsv(278, 61%, 26%)
CMYKcmyk(22.7%, 60.6%, 0%, 74.1%)
CIE-LABlab(14.60, 20.99, -20.56)
CIE-LCHlch(14.60, 29.38, 315.60°)
OKLaboklab(27.26% 0.0504 -0.0575)
OKLCHoklch(27.26% 0.076 311.2)
XYZxyz(2.7178, 1.8360, 5.3644)
Luminance0.0184 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A42 #29421A
analogous
#1F1A42 #331A42 #421A3D
triadic
#331A42 #42331A #1A4233
tetradic
#331A42 #421F1A #29421A #1A3D42
square
#331A42 #421F1A #29421A #1A3D42
split-complementary
#331A42 #3D421A #1A421F
monochromatic
#110916 #110916 #331A42 #552B6E #773D9A

Accessibility & contrast

On white

15.36
#331A42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.37
#331A42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A42
15.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A42#FFFFFF#000000##FFFFFF
##331A421.0015.361.3715.36
#FFFFFF15.361.0021.001.00
#0000001.3721.001.0021.00
##FFFFFF15.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0F2443
Deuteranopia (green-blind)
#172541
Tritanopia (blue-blind)
#31212B
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #331a42;
/* rgb */ color: rgb(51, 26, 66);
/* oklch */ color: oklch(27.3% 0.076 311.2);
Tailwind
colors: {
  custom: {
    50: '#6c5776',
    500: '#331a42',
    950: '#000000',
  },
}
SCSS
$custom: #331a42;
$custom-light: #6c5776;
$custom-dark: #000000;
JSON
{
  "hex": "#331a42",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 66
  },
  "hsl": {
    "h": 277.5,
    "s": 43.478,
    "l": 18.039
  },
  "oklch": {
    "l": 0.27262,
    "c": 0.07647,
    "h": 311.2
  },
  "luminance": 0.01836
}

Semantic roles & 50–950 ramp

primary
#331A42
secondary
#557840
accent
#D35584
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070308
muted
#7A787B

Preview Lab

Preview with #331A42

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

Preview Lab → · Contrast checker → · Palette generator →

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