Maroon Colors  ·  Color Library

Palettes / Colors / #331B71

#331B71 — Deep Purple

#331B71 is a purple color we call Deep 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 #331B71 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.

#331B71 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 #576F1B; it also sits naturally between #1B2D6F and #5D1B6F. In the palettes below you can see it working alongside real color combinations from our collection.

#331B71 · RGB 51, 27, 113

Download PNG swatch SVG

Color values

HEX#331B71
RGB51, 27, 113
HSL257°, 61%, 27%
HSV257°, 76%, 44%
CMYK55%, 76%, 0%, 56%
XYZ4.74, 2.68, 15.89
Yxy2.68, 0.2033, 0.1150
CIE-Lab18.71, 34.39, -45.45
Hunter Lab16.37, 24.27, -48.79

RGB & CMYK percentages

Red 20% · Green 11% · Blue 44%

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

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

Previews

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

CSS code for #331B71

.text { color: #331B71; }
.background { background-color: #331B71; }
.border { border: 3px solid #331B71; }
.text-rgb { color: rgb(51, 27, 113); }
.text-hsl { color: hsl(257, 61%, 27%); }
.text-shadow-hex { text-shadow: 4px 4px 2px #331B71; }
.text-shadow-rgba { text-shadow: 4px 4px 2px rgba(51, 27, 113, 0.8); }
.box-shadow-hex { box-shadow: 1px 1px 3px 2px #331B71; }
.box-shadow-rgba { box-shadow: 1px 1px 3px 2px rgba(51, 27, 113, 0.8); }

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

Shades of #331B71

#2F1967#29165A#261452#22124A#1E1042#180D35#150B2D#110925#0B0619#080410

Tints of #331B71

#40228C#4D29A8#5A30C5#6E46D2#8463D9#987CDF#AE98E6#C5B5ED#DCD2F4#F2EFFB

Tones of #331B71

#352169#382763#3A2D5D#3D3357#403951#423F4B

Color harmonies

Complementary — #576F1B:

Analogous:

Triadic:

Contrast & accessibility

Against white text13.67:1 AAA
Against black text1.54:1 Fails

Best text color on #331B71: #FFFFFF.

Semi-transparent (opacity) text on #331B71

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 #331B71: ·

How #331B71 looks with color blindness

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

Protanopia · #29285CDeuteranopia · #2A2C57Tritanopia · #324C48

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 #331B71 rather than the exact color:

Palette F2afef
#F2AFEF · #C499F3 · #7360DF · #33186B
Tender Ruby Meadow
#206241 · #225C7A · #302173 · #2B0F2A
Rustic Ruby Horizon
#40682E · #1B8052 · #142733 · #362370
Gentle Tempest
#371D79 · #831F72 · #571713 · #6F6B25
Dreamy Zephyr
#5B8BCF · #2D1F77 · #882CAE · #8C2770
Dreamy Ruby Mirage
#1E537B · #2C176C · #7D2576 · #2B0A0E

Similar colors

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

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

Browse neighbouring colors

← #331B70  ·  #331B72 →

Frequently asked questions

What color is #331B71?

#331B71 is Deep Purple, a purple color (RGB 51, 27, 113). Its closest standard named color is MidnightBlue.

What is the RGB and HSL of #331B71?

#331B71 is RGB 51, 27, 113 — HSL 257°, 61%, 27% — CMYK 55%, 76%, 0%, 56%.

What colors go with #331B71?

Its complement is #576F1B; analogous partners are #1B2D6F and #5D1B6F. It also appears in 6+ palettes in our collection.

Can I use #331B71 for text?

White text on #331B71 has a contrast ratio of 13.67:1 (passes WCAG AA); black text gives 1.54:1.