Maroon Colors  ·  Color Library

Palettes / Colors / #331C71

#331C71 — Purple

#331C71 is a purple color we call Purple, closest to the named color MidnightBlue (#191970). It belongs to the purple family.

Color name

Closest CSS keyword: midnightblue (#191970) — not an exact match. CSS midnightblue gives you #191970, a different color; use #331C71 when you need this exact shade.

Sources: common names follow widely used color-name references; CSS keywords and their hex values follow the CSS Color specification.

#331C71 is a cool purple color associated with luxury, creativity and mystery. It is saturated enough to be the accent — buttons, highlights and calls to action — while neutrals do the quiet work around it.

Its strongest partner is its complement #5B721D; it also sits naturally between #1D3172 and #5E1D72. In the palettes below you can see it working alongside real color combinations from our collection.

#331C71 · RGB 51, 28, 113

Download PNG swatch SVG

Color values

HEX#331C71
RGB51, 28, 113
HSL256°, 60%, 28%
HSV256°, 75%, 44%
CMYK55%, 75%, 0%, 56%
XYZ4.76, 2.73, 15.90
Yxy2.73, 0.2036, 0.1166
CIE-Lab18.91, 33.82, -45.12
Hunter Lab16.51, 23.83, -48.21

RGB & CMYK percentages

Red 20% · Green 11% · Blue 44%

Cyan 55% · Magenta 75% · Yellow 0% · Key 56%

CMYK values are unprofiled approximations for screen reference — not a print-proofing guarantee.

Previews

Sample text in #331C71 on black
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sample text in #331C71 on white
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

CSS code for #331C71

.text { color: #331C71; }
.background { background-color: #331C71; }
.border { border: 3px solid #331C71; }
.text-rgb { color: rgb(51, 28, 113); }
.text-hsl { color: hsl(256, 60%, 28%); }
.text-shadow-hex { text-shadow: 4px 4px 2px #331C71; }
.text-shadow-rgba { text-shadow: 4px 4px 2px rgba(51, 28, 113, 0.8); }
.box-shadow-hex { box-shadow: 1px 1px 3px 2px #331C71; }
.box-shadow-rgba { box-shadow: 1px 1px 3px 2px rgba(51, 28, 113, 0.8); }

HTML: <p style="color:#331C71">Text here</p> · <div style="background-color:#331C71">Div content here</div>

Shades of #331C71

#301B6A#2A175E#271556#211249#1D1041#1A0E39#140B2D#110925#0B0618#070410

Tints of #331C71

#40248F#4D2BAB#5831C4#6C47D1#8364D8#9A81DF#B19DE7#C4B6ED#DBD2F4#F2EFFB

Tones of #331C71

#36236C#392966#3C2F60#3F355A#423B54#44414E

Color harmonies

Complementary — #5B721D:

Analogous:

Triadic:

Contrast & accessibility

Against white text13.59:1 AAA
Against black text1.55:1 Fails

Best text color on #331C71: #FFFFFF.

Semi-transparent (opacity) text on #331C71

Text set with opacity blends into the background, so its real contrast is lower than the solid ratios above. Choose a text color and an opacity to see the blended color and its true ratio:

100%
Sample heading text
Smaller body text shows the effect best.

Blended color: · Contrast against #331C71: ·

How #331C71 looks with color blindness

Simulated with standard Machado color-vision-deficiency matrices — useful when this color carries meaning in charts, maps or interfaces:

Protanopia · #29295CDeuteranopia · #2A2C58Tritanopia · #324C49

Closest design-system colors

The nearest matches in the Tailwind CSS, Material Design and Bootstrap palettes — handy when you need a framework class instead of a raw hex:

Tailwind slate 600 · #475569Tailwind gray 600 · #4B5563Tailwind zinc 600 · #52525B

Palettes with a similar color

These palettes use a close neighbour of #331C71 rather than the exact color:

Tender Ruby Meadow
#206241 · #225C7A · #302173 · #2B0F2A
Palette F2afef
#F2AFEF · #C499F3 · #7360DF · #33186B
Rustic Ruby Horizon
#40682E · #1B8052 · #142733 · #362370
Dreamy Zephyr
#5B8BCF · #2D1F77 · #882CAE · #8C2770
Gentle Tempest
#371D79 · #831F72 · #571713 · #6F6B25
Royal Dusk
#115132 · #12374C · #33256D · #742270

Similar colors

The closest colors that actually appear in our palette collection — click any to open its page:

#302173#33186B#362370#2D1F77#371D79#33256D#2C176C#2E236C#3D1E6C#29176D#302579#3B2575

Browse neighbouring colors

← #331C70  ·  #331C72 →

Frequently asked questions

What color is #331C71?

#331C71 is Purple, a purple color (RGB 51, 28, 113). Its closest standard named color is MidnightBlue.

What is the RGB and HSL of #331C71?

#331C71 is RGB 51, 28, 113 — HSL 256°, 60%, 28% — CMYK 55%, 75%, 0%, 56%.

What colors go with #331C71?

Its complement is #5B721D; analogous partners are #1D3172 and #5E1D72. It also appears in 6+ palettes in our collection.

Can I use #331C71 for text?

White text on #331C71 has a contrast ratio of 13.59:1 (passes WCAG AA); black text gives 1.55:1.