Skip to content

#331c33

a deep, soft magenta / pink · neutral · closest name: Midnight Blue

RGB
51, 28, 51
HSL
300°, 29%, 16%
CMYK
0, 45, 0, 80
Luminance
0.0177

At a glance

Every number on this page in one read: what #331c33 is made of, how bright it looks, and which way it leans.

Hex
#331c33
Hue
300°
magenta / pink
Saturation
29%
soft
Lightness
16%
deep
Brightness
20%
HSV value
Perceived
15%
weighted brightness
Luminance
0.0177
WCAG relative
Temperature
Neutral
50/100 cool
Color family
Magenta / pink
Tone
Soft
Best ink
White
15.50:1
Closest name
Midnight Blue
ΔE2000 17.8
Where it sits
Hue300° of 360°
Saturation29%
Lightness16%
Temperature
Warm ← → Cool50% cool

Reads neutral. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#331c33
RGBrgb(51, 28, 51)
HSLhsl(300, 29%, 16%)
CMYKcmyk(0%, 45%, 0%, 80%)
LABlab(14.3 15.8 -10.5)
LCHlch(14.3 19.0 326.5)
OKLCHoklch(0.267 0.052 326.9)
Decimal3349555
Display P3color(display-p3 0.200 0.110 0.200)

Copy-ready code

/* CSS */
color: #331c33;
background-color: #331c33;
/* Tailwind (arbitrary) */
class="text-[#331c33] bg-[#331c33]"
/* SCSS */
$brand: #331c33;
/* SwiftUI */
Color(red: 0.200, green: 0.110, blue: 0.200)
/* Android */
Color.parseColor("#331c33")
/* Flutter */
Color(0xFF331C33)
/* Python / OpenCV (BGR) */
(51, 28, 51)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #331c33 · 15.50:1
Use #ffffffAAA at every size.
Aa
White text · 15.50:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.35:1
AA fail · AA large fail · AAA fail
Reading the other direction: #331c33 as text scores 15.50:1 on white and 1.35:1 on black.

Accessibility — WCAG contrast

Aa
#331c33 on white: 15.50:1
AA ✓ pass · AA-large · AAA
Aa
#331c33 on black: 1.35:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #1A2234
deuteranopia · #202532
tritanopia · #341E25

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #331c33 is pinned to step 950; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F9F6F9
#F3ECF3
#E6D5E6
#D7B7D7
#C392C3
#AF6EAF
#9E579E
#844884
#693A69
#4E2D4E
#331c33
Base = 950Lightest = 50 · #F9F6F9Darkest = 950 · #331c33
:root {
  --brand-50: #F9F6F9;
  --brand-100: #F3ECF3;
  --brand-200: #E6D5E6;
  --brand-300: #D7B7D7;
  --brand-400: #C392C3;
  --brand-500: #AF6EAF;
  --brand-600: #9E579E;
  --brand-700: #844884;
  --brand-800: #693A69;
  --brand-900: #4E2D4E;
  --brand-950: #331c33;
  --brand: #331c33;
  --brand-ink: #ffffff;
}

Colors that work with #331c33

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#FAF5FA
Tinted page background
Border#E2CAE2
Hairlines and dividers
Muted text#945194
Captions on the surface
Accent#21351A
Second voice, not a rival
Dark variant#522D52
Hover, pressed, headers
Light variant#F6EFF6
Selected rows, tints
Dark surface#241424
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #331c33

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Charts, tags and secondary surfaces
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Black text placed on it
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#1C331C
Analogous left#281C33
Analogous right#331C28
Split-complement 1#28331C
Split-complement 2#1C3328
Triadic 1#33331C
Triadic 2#1C3333
Tetradic#33281C

RGB percentages

Red20.0%
Green11.0%
Blue20.0%

CMYK percentages

Cyan0.0%
Magenta45.1%
Yellow0.0%
Key (black)80.0%

Color previews

#331c33 text on a black background

contrast 1.35:1

Card sample

#331c33 text on a white background

contrast 15.50:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #331c33;
Background color
Panel with #331c33 background
background-color: #331c33;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #331c33;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(51, 28, 51, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(51, 28, 51, 0.45);
Border & gradient
Gradient panel
border: 3px solid #331c33;
background: linear-gradient(135deg, #331c33, #331C24);

Monochromatic scale

Palettes built from #331c33

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#331c33 in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
BeautyFashionLifestyleYouth brands
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#331c33, answered

What color is #331c33?

#331c33 is a deep soft magenta / pink, closest to Midnight Blue (ΔE2000 17.8). It sits at 300° on the hue wheel with 29% saturation and 16% lightness, which reads as neutral.

What is the RGB value of #331c33?

rgb(51, 28, 51) — 51 red, 28 green and 51 blue out of 255, or 20% / 11% / 20% by channel.

Is #331c33 a light or a dark color?

It is a dark color. Relative luminance is 0.0177 and perceived brightness is 15%, so white text on it reaches 15.50:1.

Should I use black or white text on #331c33?

White. It scores 15.50:1 against #331c33, versus 1.35:1 for black — AAA at any size.

What is the complementary color of #331c33?

#1C331C sits directly opposite on the wheel. Softer options are the split-complements #28331C and #1C3328, which give the same contrast with far less vibration.

What colors go well with #331c33?

For interface work: #FAF5FA as the surface, #E2CAE2 for borders, #945194 for secondary text, #21351A as an accent and #522D52 for hover and pressed states. For a palette, the analogous pair #281C33 and #331C28 stays calm, while #1C331C is the loudest partner.

What is #331c33 in CMYK for printing?

cmyk(0%, 45%, 0%, 80%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #331c33 warm or cool?

Neutral — it scores 50 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #331C2B; nudged cooler, #2B1B34.

Work with #331c33 in the Color Lab