#331242#331242

#331242 is a dark, moderate purple. Relative luminance 0.015; OKLCH L 25.9% C 0.091 H 313.5°. Best body text is #FFFFFF at 16.08:1 contrast (WCAG AA passes).

Color values

HEX#331242
RGBrgb(51, 18, 66)
HSLhsl(281, 57%, 16%)
HSVhsv(281, 73%, 26%)
CMYKcmyk(22.7%, 72.7%, 0%, 74.1%)
CIE-LABlab(12.80, 25.85, -23.44)
CIE-LCHlch(12.80, 34.89, 317.80°)
OKLaboklab(25.95% 0.0626 -0.0659)
OKLCHoklch(25.95% 0.091 313.5)
XYZxyz(2.5647, 1.5298, 5.3134)
Luminance0.0153 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331242 #214212
analogous
#1B1242 #331242 #421239
triadic
#331242 #423312 #124233
tetradic
#331242 #421B12 #214212 #123942
square
#331242 #421B12 #214212 #123942
split-complementary
#331242 #394212 #12421B
monochromatic
#130718 #130718 #331242 #581F72 #7D2CA2

Accessibility & contrast

On white

16.08
#331242 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.31
#331242 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331242
16.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331242#FFFFFF#000000##FFFFFF
##3312421.0016.081.3116.08
#FFFFFF16.081.0021.001.00
#0000001.3121.001.0021.00
##FFFFFF16.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#011F43
Deuteranopia (green-blind)
#0F2241
Tritanopia (blue-blind)
#321B28
Achromatopsia (no color)
#212121

Design tokens & code

CSS
--color: #331242;
/* rgb */ color: rgb(51, 18, 66);
/* oklch */ color: oklch(25.9% 0.091 313.5);
Tailwind
colors: {
  custom: {
    50: '#6d5277',
    500: '#331242',
    950: '#000000',
  },
}
SCSS
$custom: #331242;
$custom-light: #6d5277;
$custom-dark: #000000;
JSON
{
  "hex": "#331242",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 66
  },
  "hsl": {
    "h": 281.25,
    "s": 57.143,
    "l": 16.471
  },
  "oklch": {
    "l": 0.25945,
    "c": 0.09094,
    "h": 313.5
  },
  "luminance": 0.0153
}

Semantic roles & 50–950 ramp

primary
#331242
secondary
#4B7B35
accent
#E04777
background
#F6F4F7
surface
#ECE7ED
border
#C7C3C8
text
#070208
muted
#7A787B

Preview Lab

Preview with #331242

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

Preview Lab → · Contrast checker → · Palette generator →

#331242 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva