Skip to content

#331c37

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

RGB
51, 28, 55
HSL
291°, 33%, 16%
CMYK
7, 49, 0, 78
Luminance
0.0181

At a glance

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

Hex
#331c37
Hue
291°
magenta / pink
Saturation
33%
soft
Lightness
16%
deep
Brightness
22%
HSV value
Perceived
16%
weighted brightness
Luminance
0.0181
WCAG relative
Temperature
Neutral
55/100 cool
Color family
Magenta / pink
Tone
Soft
Best ink
White
15.42:1
Closest name
Midnight Blue
ΔE2000 16.5
Where it sits
Hue291° of 360°
Saturation33%
Lightness16%
Temperature
Warm ← → Cool55% 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#331c37
RGBrgb(51, 28, 55)
HSLhsl(291, 33%, 16%)
CMYKcmyk(7%, 49%, 0%, 78%)
LABlab(14.5 16.8 -13.0)
LCHlch(14.5 21.3 322.2)
OKLCHoklch(0.269 0.058 321.5)
Decimal3349559
Display P3color(display-p3 0.200 0.110 0.216)

Copy-ready code

/* CSS */
color: #331c37;
background-color: #331c37;
/* Tailwind (arbitrary) */
class="text-[#331c37] bg-[#331c37]"
/* SCSS */
$brand: #331c37;
/* SwiftUI */
Color(red: 0.200, green: 0.110, blue: 0.216)
/* Android */
Color.parseColor("#331c37")
/* Flutter */
Color(0xFF331C37)
/* Python / OpenCV (BGR) */
(55, 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 #331c37 · 15.42:1
Use #ffffffAAA at every size.
Aa
White text · 15.42:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.36:1
AA fail · AA large fail · AAA fail
Reading the other direction: #331c37 as text scores 15.42:1 on white and 1.36:1 on black.

Accessibility — WCAG contrast

Aa
#331c37 on white: 15.42:1
AA ✓ pass · AA-large · AAA
Aa
#331c37 on black: 1.36:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #192338
deuteranopia · #1F2536
tritanopia · #341F26

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #331c37 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.

#F9F5F9
#F2ECF4
#E5D4E7
#D4B5D9
#BE90C6
#A86AB3
#9653A2
#7D4587
#64376C
#4A2B4F
#331c37
Base = 950Lightest = 50 · #F9F5F9Darkest = 950 · #331c37
:root {
  --brand-50: #F9F5F9;
  --brand-100: #F2ECF4;
  --brand-200: #E5D4E7;
  --brand-300: #D4B5D9;
  --brand-400: #BE90C6;
  --brand-500: #A86AB3;
  --brand-600: #9653A2;
  --brand-700: #7D4587;
  --brand-800: #64376C;
  --brand-900: #4A2B4F;
  --brand-950: #331c37;
  --brand: #331c37;
  --brand-ink: #ffffff;
}

Colors that work with #331c37

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#F9F5FA
Tinted page background
Border#E0C9E3
Hairlines and dividers
Muted text#8D4D98
Captions on the surface
Accent#26391A
Second voice, not a rival
Dark variant#4E2B54
Hover, pressed, headers
Light variant#F5EEF6
Selected rows, tints
Dark surface#221424
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 #331c37

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#20371C
Analogous left#261C37
Analogous right#371C2E
Split-complement 1#2E371C
Split-complement 2#1C3726
Triadic 1#37331C
Triadic 2#1C3733
Tetradic#37261C

RGB percentages

Red20.0%
Green11.0%
Blue21.6%

CMYK percentages

Cyan7.3%
Magenta49.1%
Yellow0.0%
Key (black)78.4%

Color previews

#331c37 text on a black background

contrast 1.36:1

Card sample

#331c37 text on a white background

contrast 15.42:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #331c37

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.

#331c37 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.

#331c37, answered

What color is #331c37?

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

What is the RGB value of #331c37?

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

Is #331c37 a light or a dark color?

It is a dark color. Relative luminance is 0.0181 and perceived brightness is 16%, so white text on it reaches 15.42:1.

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

White. It scores 15.42:1 against #331c37, versus 1.36:1 for black — AAA at any size.

What is the complementary color of #331c37?

#20371C sits directly opposite on the wheel. Softer options are the split-complements #2E371C and #1C3726, which give the same contrast with far less vibration.

What colors go well with #331c37?

For interface work: #F9F5FA as the surface, #E0C9E3 for borders, #8D4D98 for secondary text, #26391A as an accent and #4E2B54 for hover and pressed states. For a palette, the analogous pair #261C37 and #371C2E stays calm, while #20371C is the loudest partner.

What is #331c37 in CMYK for printing?

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

Is #331c37 warm or cool?

Neutral — it scores 55 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #371C31; nudged cooler, #291B38.

Work with #331c37 in the Color Lab