#331F42#331F42

#331F42 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.2% C 0.067 H 309.1°. Best body text is #FFFFFF at 14.84:1 contrast (WCAG AA passes).

Color values

HEX#331F42
RGBrgb(51, 31, 66)
HSLhsl(274, 36%, 19%)
HSVhsv(274, 53%, 26%)
CMYKcmyk(22.7%, 53%, 0%, 74.1%)
CIE-LABlab(15.89, 17.68, -18.52)
CIE-LCHlch(15.89, 25.61, 313.66°)
OKLaboklab(28.22% 0.042 -0.0517)
OKLCHoklch(28.22% 0.067 309.1)
XYZxyz(2.8384, 2.0772, 5.4046)
Luminance0.0208 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F42 #2E421F
analogous
#221F42 #331F42 #421F40
triadic
#331F42 #42331F #1F4233
tetradic
#331F42 #42221F #2E421F #1F4042
square
#331F42 #42221F #2E421F #1F4042
split-complementary
#331F42 #40421F #1F4222
monochromatic
#100A15 #130B18 #331F42 #53336C #734695

Accessibility & contrast

On white

14.84
#331F42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#331F42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F42
14.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F42#FFFFFF#000000##FFFFFF
##331F421.0014.841.4214.84
#FFFFFF14.841.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#172743
Deuteranopia (green-blind)
#1C2841
Tritanopia (blue-blind)
#31252D
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331f42;
/* rgb */ color: rgb(51, 31, 66);
/* oklch */ color: oklch(28.2% 0.067 309.1);
Tailwind
colors: {
  custom: {
    50: '#6c5b76',
    500: '#331f42',
    950: '#000000',
  },
}
SCSS
$custom: #331f42;
$custom-light: #6c5b76;
$custom-dark: #000000;
JSON
{
  "hex": "#331f42",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 66
  },
  "hsl": {
    "h": 274.286,
    "s": 36.082,
    "l": 19.02
  },
  "oklch": {
    "l": 0.28215,
    "c": 0.06656,
    "h": 309.1
  },
  "luminance": 0.02077
}

Semantic roles & 50–950 ramp

primary
#331F42
secondary
#5B7647
accent
#CC5C8C
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070408
muted
#7A797B

Preview Lab

Preview with #331F42

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

Preview Lab → · Contrast checker → · Palette generator →

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