Maroon Colors  ·  Color Library

Palettes / Colors / #331B72

#331B72 — Purple

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

#331B72 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 #5B741B; it also sits naturally between #1B2E74 and #601B74. In the palettes below you can see it working alongside real color combinations from our collection.

#331B72 · RGB 51, 27, 114

Download PNG swatch SVG

Color values

HEX#331B72
RGB51, 27, 114
HSL257°, 62%, 28%
HSV257°, 76%, 45%
CMYK55%, 76%, 0%, 55%
XYZ4.79, 2.70, 16.19
Yxy2.70, 0.2024, 0.1141
CIE-Lab18.81, 34.70, -45.93
Hunter Lab16.44, 24.55, -49.61

RGB & CMYK percentages

Red 20% · Green 11% · Blue 45%

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

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

Previews

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

CSS code for #331B72

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

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

Shades of #331B72

#30196B#2B165F#271457#22114A#1E1042#1A0E3A#150B2D#110925#0B0619#070411

Tints of #331B72

#412291#4E29AE#5A2FC6#6D45D3#8462DA#9B7FE1#B19CE8#C5B5EE#DBD2F4#F2EEFB

Tones of #331B72

#37226D#3A2867#3D2E60#3F345B#423B54#45414E

Color harmonies

Complementary — #5B741B:

Analogous:

Triadic:

Contrast & accessibility

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

Best text color on #331B72: #FFFFFF.

Semi-transparent (opacity) text on #331B72

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

How #331B72 looks with color blindness

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

Protanopia · #29285DDeuteranopia · #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 #331B72 rather than the exact color:

Tender Ruby Meadow
#206241 · #225C7A · #302173 · #2B0F2A
Palette F2afef
#F2AFEF · #C499F3 · #7360DF · #33186B
Gentle Tempest
#371D79 · #831F72 · #571713 · #6F6B25
Dreamy Zephyr
#5B8BCF · #2D1F77 · #882CAE · #8C2770
Rustic Ruby Horizon
#40682E · #1B8052 · #142733 · #362370
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:

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

Browse neighbouring colors

← #331B71  ·  #331B73 →

Frequently asked questions

What color is #331B72?

#331B72 is Purple, a purple color (RGB 51, 27, 114). Its closest standard named color is MidnightBlue.

What is the RGB and HSL of #331B72?

#331B72 is RGB 51, 27, 114 — HSL 257°, 62%, 28% — CMYK 55%, 76%, 0%, 55%.

What colors go with #331B72?

Its complement is #5B741B; analogous partners are #1B2E74 and #601B74. It also appears in 6+ palettes in our collection.

Can I use #331B72 for text?

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