Closest web-safe match: #333366

Color Details and Palettes for #402C56

Details about the color Midnight Pie#402C56

Conversions, palettes, contrast & design ideas for this color.

Indigo family Cool WCAG ink: white
HEX #402C56 RGB rgb(64, 44, 86) HSL hsl(269, 32%, 25%) CMYK cmyk(26%, 49%, 0%, 66%)

Color profile

About Color Hex #402C56

#402C56 is a cool color from the Indigo family, closest in name to “Midnight Pie”. In RGB it is rgb(64, 44, 86); in HSL, hsl(269, 32%, 25%).

The color Midnight Pie, with hexadecimal code #402c56, belongs to the blue color family, the world's most universally preferred hue. Blue projects trust, stability, and intellectual calm, which is why it dominates corporate, financial, and technology branding worldwide. Additionally, it evokes emotions such as Luxury, Royalty, Spirituality, Imagination and Wisdom. Blue signifies tranquility and stability. In Middle Eastern cultures, it can also represent protection against the evil eye, while in Western cultures, it symbolizes calmness and reliability. With a moderate saturation of 32%, it has a softened, muted quality that lends sophistication and works well for backgrounds and secondary elements. Its low lightness of 25% produces a deep, rich appearance—conveying gravity and luxury, particularly effective in dark-mode designs and premium packaging. This color is ideal for designs that aim to express Luxury, Royalty, Spirituality, Imagination, or Wisdom. It can be effectively used in web design, branding, and marketing materials to attract attention and convey specific messages.

Key facts

RGB 64, 44, 86 red · green · blue HSL 269° 32% 25% hue · sat · light HSV 269° 49% 34% design-app pickers CMYK 26 49 0 66 print inks, % Luminance 0.036 0 dark → 1 light On black 1.71:1 ✕ AA contrast ratio On white 12.26:1 ✓ AA contrast ratio Web-safe #333366 closest web-safe Best text white ideal foreground Character Vivid cool · indigo family

The story of this color

History, Usage, Psychology & Design Ideas for #402C56

Midnight Pie (#402C56) belongs to the Indigo color family.

This deep, saturated shade conveys authority and richness. Deep tones are favored in luxury packaging, evening-event branding, and dark-mode interfaces where they provide dramatic contrast against lighter elements.

Historical Background

Indigo dye—extracted from Indigofera plants—has been used for over 6,000 years, with the oldest known samples found in Peru. It was the foundation of the blue-dye trade across India, West Africa, and the Americas, and its economic importance rivaled that of spices. Levi Strauss chose indigo-dyed denim for the first blue jeans in 1873, cementing indigo's place in everyday fashion worldwide.

Design & Usage Tips

Indigo occupies the territory between blue and purple, lending depth without purple's flamboyance. It is excellent for evening-event branding, high-end fashion, and editorial design. Pair indigo with soft gold or warm white for a sophisticated contrast, or with coral for a contemporary editorial palette.

Sitting on the cool side of the spectrum (hue 269°), it promotes a feeling of calm distance and intellectual clarity, which is why cool hues dominate corporate identities, healthcare design, and productivity tools. At 32% saturation, the color has a muted, sophisticated quality that pairs well with bolder accents. It works as a background, a border, or a secondary element in layered compositions.

Psychological Impact

Indigo conveys depth, wisdom, and introspection. It carries the trustworthiness of blue with a hint of purple's creativity, appealing to brands that want to appear both reliable and imaginative—think higher education, think-tanks, and creative consultancies.

Its low lightness of 25% gives it a deep, intense presence. Deep tones like this excel as dark-mode backgrounds, header bars, and anywhere a sense of gravity or luxury is desired.

Creative Design Ideas

Use indigo as a full-page background with centered white text for impactful statement pages. Combine indigo with copper accents for a rich, modern luxury feel in packaging. In web design, indigo sidebar navigation with white icons creates a polished, app-like interface.

Every format

#402C56 Color Conversions

Every way to write Midnight Pie — one-tap copy on every format; tap on any card to learn what it is and when to use it.

12 formats
HEX Web
#402C56

Hexadecimal is the web’s universal color notation — two digits each for red, green and blue. Drop it straight into HTML, CSS or any design tool.

RGB Screen
rgb(64, 44, 86)

RGB is the additive Red-Green-Blue model every screen uses to emit light. The default choice for websites, apps and on-screen UI.

HSL Web
hsl(269, 32%, 25%)

HSL breaks a color into Hue, Saturation and Lightness — the most intuitive way to lighten, darken or mute a color in CSS.

HSV HSB Design
hsv(269, 49%, 34%)

HSV (also called HSB) maps Hue, Saturation and Value/Brightness. It is the model behind the color pickers in Photoshop, Figma and most design apps.

HWB CSS 4
hwb(269 17% 66%)

HWB blends a pure hue with Whiteness and Blackness — a painter-friendly model added in CSS Color 4 for quick tints and shades.

CMYK Print
cmyk(26%, 49%, 0%, 66%)

CMYK is the subtractive Cyan-Magenta-Yellow-Black ink model. Use these values when preparing artwork for a printer or commercial press.

OKLCH Modern
oklch(33.68% 0.075 304.66)

OKLCH is a modern, perceptually-uniform space (Lightness, Chroma, Hue). It powers smooth gradients and accessible palettes in today’s CSS.

OKLab Modern
oklab(33.68% 0.043 -0.062)

OKLab is the Cartesian form of OKLCH — ideal for blending and interpolating colors without the muddy midpoints older spaces produce.

CIELAB L*a*b* Perceptual
L: 22.17, a: 18.92, b: -22.09

CIELAB is a device-independent, perceptually-uniform space. It is the standard for measuring color difference (ΔE) and matching across devices.

LCH Perceptual
L: 22.17, C: 29.09, H: 310.58

LCH is CIELAB in cylindrical form — Lightness, Chroma and Hue — letting you adjust vividness and hue while staying perceptually even.

XYZ CIE Science
X: 4.69, Y: 3.56, Z: 9.24

CIE XYZ is the 1931 master space that underpins every other model here — the scientific bridge used to convert between color systems.

Decimal int Code
4205654

The 24-bit integer value of the color — handy for databases, APIs, game engines and low-level graphics code.

Channel breakdown

RGB Color Percentages for #402C56

How much red, green and blue light mixes into Midnight Pie.

Red 64/255 33.0% Green 44/255 22.7% Blue 86/255 44.3%

Percentages show each channel's share of the total light (R + G + B) in Midnight Pie.

Ink coverage

CMYK Ink Levels & Print Guide for #402C56

Ink needed to reproduce Midnight Pie in four-color print. Heaviest ink: Key (Black).

26% CYAN 49% MAGENTA 0% YELLOW 66% KEY

Print tip: treat these values as a starting point — final output depends on printer profile, paper stock and calibration.

Accessibility · WCAG

Luminance & Contrast for #402C56

How bright Midnight Pie is, and how far black and white text clear each WCAG bar.

Relative luminance 0.036
0 · dark1 · light

Contrast ratio · 1:1 → 21:1 (log scale)

Aa Black text 1.71:1 ✕ AA ✕ AAA ✕ Large
Aa White text 12.26:1 ✓ AA ✓ AAA ✓ Large

Developer shortcuts

Quick CSS Snippets for #402C56

Copy-and-paste CSS for Midnight Pie — per-line copy, or grab the whole block.

midnight-pie.css
background-color: #402C56;
color: #402C56;
border: 2px solid #402C56;
background-color: rgb(64, 44, 86);
background-color: hsl(269, 32%, 25%);
--color: #402C56;

Shades · light to dark

#402C56 Monochrome Palette

Lighter and darker steps of Midnight Pie — the color's full brightness range in one strip.

#ECEAEE
#CFCAD5
#B3ABBB
#968BA2
#796B89
#5D4C6F
#402C56
#362549
#2D1F3C
#23182F
#1A1222
#100B16
#060409

The dot marks the original color. Hover any shade to copy its hex or open its color page.

Harmony · 180° apart

#402C56 Complementary Palette

Two colors opposite on the wheel — maximum contrast for attention-grabbing accents.

#402C56
#40542B

The dot marks the original color. Hover any shade to copy its hex or open its color page.

Harmony · adjacent hues

#402C56 Analogic Palette

Neighboring hues on the wheel — harmonious, calm combinations that feel unified.

#402C56
#532B54
#2B2C54
#542B40
#2B4054
#542B2C
#2B5453

The dot marks the original color. Hover any shade to copy its hex or open its color page.

Harmony · 120° apart

#402C56 Triadic Palette

Three colors evenly spaced on the wheel — vibrant and energetic, yet balanced.

#402C56
#543F2B
#2B543F

The dot marks the original color. Hover any shade to copy its hex or open its color page.

Harmony · 90° apart

#402C56 Quad Palette

Four colors evenly spaced on the wheel (tetradic) — rich schemes with multiple accents.

#402C56
#542B2C
#40542B
#2B5453

The dot marks the original color. Hover any shade to copy its hex or open its color page.

Accessibility

Color Blindness Simulation for #402C56

How Midnight Pie reads across five kinds of color vision — a ✓ Friendly verdict means the color difference stays distinguishable for that vision type.

#402C56
#393A49
#37374C
#3F4442
#333333
Normal vision full color Deuteranopia green weakness ✓ Friendly Protanopia red weakness ✓ Friendly Tritanopia blue-yellow weakness ✓ Friendly Achromatopsia total color blindness ✓ Friendly

The dot marks the original color. Hover any shade to copy its hex.

Harmony overview

Color Harmonies for #402C56

The lead color from each harmony scheme, side by side — a shortcut to the full palettes above.

#40542B
#532B54
#543F2B
#542B2C
Complementary opposite hue Analogous adjacent hue Triadic 120° apart Tetradic (Quad) 90° apart

Perceptually nearby

#402C56 Nearby Colors

A step away in brightness, richness or shade — each still feels like the same color.

Purple Protégé#553366
Midnight Velvet#332244
In the Vines#554477
Midnight Monarch#221133
Fading Horizon#442266
Sanctum of Shadows#443355
Wonka Purple#442255
Midnight Escapade#333355

From the color-name library

Colors Similar to #402C56

The closest named colors to #402C56 — same mood, each with its own character.

Midnight Pie#372D52
Stormy Night#372354
Royal Crown#4F325E
Sanctum of Shadows#3C2F4E
Wonka Purple#4A2559
Purple Noir#322C56
Meteorite#4A3B6A
Plunged Into Darkness#431C53
Pāua#2A2551
Midnight Velvet#2A2243
Purple Protégé#593569
Purple Void#442244

Looking for more Blue shades? Browse Blue colors →

Inspiration

Explore Vibrant Images Featuring Midnight Pie (#402c56)

Curated Unsplash photos that carry the mood of Midnight Pie — hover any tile to download it or view the original.

Good to know

Frequently Asked Questions about #402C56

#402C56 is a cool color from the Indigo family. Its closest matched name is “Midnight Pie”, matched perceptually with the CIEDE2000 color-difference formula. In RGB it is rgb(64, 44, 86); in HSL, hsl(269, 32%, 25%).
In RGB, #402C56 is rgb(64, 44, 86); in HSL it is hsl(269, 32%, 25%); and in CMYK — the model used for print — it is cmyk(26%, 49%, 0%, 66%).
#402C56 has a contrast ratio of 1.71:1 against black and 12.26:1 against white. For readability, white body text meets the WCAG AA threshold of 4.5:1 on it, while black does not.
The direct complement of #402C56 is #40542B (opposite on the color wheel). For ready-made combinations, this page includes monochrome, analogous, triadic and tetradic palettes built from #402C56 in the palette sections above.