On this page
The strip and live preview above let you copy each code and check contrast. Below you get the full color values, the reasoning behind each shade, tested contrast ratios and practical ways to use the set in interfaces, print, rooms and paintings.
Night Sky Color Palette Codes: HEX, RGB, HSL and CMYK
Every value here is calculated from the hex code. The CMYK column uses the plain conversion formula, so read it as a starting point for print, not a press-ready recipe.
| Color | HEX | RGB | HSL | CMYK |
|---|---|---|---|---|
| Midnight | 11, 16, 38 | 229°, 55%, 10% | 71, 58, 0, 85 | |
| Deep Navy | 27, 35, 71 | 229°, 45%, 19% | 62, 51, 0, 72 | |
| Indigo | 59, 59, 122 | 240°, 35%, 35% | 52, 52, 0, 52 | |
| Slate Purple | 106, 90, 154 | 255°, 26%, 48% | 31, 42, 0, 40 | |
| Star White | 245, 243, 206 | 57°, 66%, 88% | 0, 1, 16, 4 |
Look at the lightness column: 10%, 19%, 35%, 48%, then a jump to 88%. That big gap is deliberate. It lets the Star White stand out like a point of light against a field that barely changes. The hues also drift from 229° toward 255° as they lighten, so the sky turns slightly more violet near the horizon.
Why Night Skies Are Blue-Black, Not Black
A pure sky reads as an empty screen. Photographs and paintings of the night sky usually lean blue or blue-violet, especially in the hour after sunset, so a blue-black like feels like air rather than a hole. Its hue sits firmly in blue, yet at 10% lightness it behaves almost like black next to the lighter steps.
Which base color makes a night sky look most natural on screen?
A blue-black keeps the cool tint real skies have, while pure black reads as an empty hole.
Twilight is a useful guide. Civil twilight ends when the Sun is 6° below the horizon, nautical twilight at 12° and astronomical twilight at 18°, and the sky darkens in stages from dusty violet-blue to its deepest tone. That is why this palette climbs from Midnight at the top to Slate Purple at the horizon. For the glowing orange and pink end of that cycle, see the dusk colors page.
Stars teach a second lesson. They are not all white: hotter stars lean blue-white and cooler ones lean orange. Star White carries a faint warm tint, which stops it from looking clinical against the cool blues.
How These Five Colors Differ from Nearby Navies and Purples
Close neighbors are easy to confuse. The CSS keyword midnightblue is , which is HSL 240°, 64%, 27%: a vivid, ink-like blue. Midnight is far darker and quieter, at 55% saturation and 10% lightness. CSS navy is purer and brighter again.
Indigo needs the same care. The CSS keyword indigo is , an intense violet. The palette’s Indigo is a muted blue-violet that stays inside the night family instead of jumping to royal purple.
If a navy looks bright on screen at 100% saturation, it is a daytime blue. Night sky blues keep saturation near 35% to 55% and push lightness below 50%.
For a richer, more regal take on violet and indigo, the royal colors palettes run brighter. Black and purple pushes the same mood darker and more dramatic.
Contrast and WCAG: Which Pairings Actually Pass
I computed these ratios from the relative luminance of each hex code, using the WCAG formula:
- Star White on Midnight: about 16.7:1
- Star White on Deep Navy: about 13.5:1
- Star White on Indigo: about 8.9:1
- Star White on Slate Purple: about 5.25:1
- Slate Purple on Midnight: about 3.2:1
WCAG AA asks for 4.5:1 for normal text, and 3:1 for large text and interface parts like icons and input borders. AAA asks for 7:1 on normal text. So Star White passes AA on every step, and passes AAA on the first three. Slate Purple on Midnight clears only the 3:1 bar, so keep it for large headings, icons and decoration.
Which text color passes WCAG AA for body text on Midnight #0B1026?
Star White reaches about 16.7:1, while Slate Purple only manages 3.2:1 and Indigo is lower still.
On one app project, helper text in Slate Purple sat on Deep Navy and looked fine on my monitor. It measures about 2.6:1, below even the large-text bar. We moved it to a pale lavender and the accessibility audit stopped flagging it. Never judge dark palettes by eye alone.
CSS Variables and a Starry Gradient You Can Paste
Define the five colors once and reuse them:

:root {
--midnight: #0B1026;
--deep-navy: #1B2347;
--indigo: #3B3B7A;
--slate-purple: #6A5A9A;
--star-white: #F5F3CE;
}
body {
background: var(--midnight);
color: var(--star-white);
}
.sky {
background: linear-gradient(
180deg,
#0B1026 0%,
#1B2347 45%,
#3B3B7A 80%,
#6A5A9A 100%
);
}
The gradient runs dark at the top and lighter toward the bottom, the way a real sky brightens near the horizon. Text on the lower end is still readable in Star White at 5.25:1, though I would use a heavier weight there.
For stars, scatter small dots in Star White at 60% to 90% opacity with a few radial-gradient layers or an SVG. Vary the sizes, and keep the dots away from text blocks so they never reduce legibility.
Using a Night Sky Palette in Apps and Websites
Each color has a job. This mapping works for most dark interfaces:
- Page background: Midnight .
- Cards and panels: Deep Navy , one step lighter so layers show depth without heavy shadows.
- Buttons and borders: Indigo , with Star White labels at 8.9:1.
- Secondary icons, badges and large accents: Slate Purple .
- Headings and body text: Star White .
Star White is softer than , which cuts glare on a dark background, a common complaint with pure white text. If you prefer a neutral dark instead of navy, the familiar chat-app gray has its own page: #36393F and matching palettes. I would choose one family per surface, because gray and navy side by side can look accidental.
Branding, Interiors and Fashion in Midnight Blues
In branding, this palette signals calm, depth and focus. It suits observatories, sleep and meditation apps, evening events and premium products that want quiet confidence. Keep Star White as the one bright note, and let a metallic gold or silver finish act as the “stars” on packaging.
In interiors, Deep Navy on a bedroom wall or ceiling feels enclosing in a good way, especially with a matte finish. Always paint a large sample and judge it at night under your real bulbs, since dark colors shift a lot between daylight and lamplight. Star White works as a warm trim or textile color.
Indigo and Slate Purple look rich in velvet, wool and satin. Add Star White in a shirt, pearls or stitching for contrast.
Planning a midnight party look or countdown theme? The New Year’s colors page shows how deep blue and gold combine for celebrations.
Print Proofs: What Happens to Deep Navy in CMYK
Screens emit light, while paper reflects it. A navy that glows on a display can print flat. Midnight converts to roughly C71 M58 Y0 K85, which is mostly black ink with a blue tint, so on uncoated stock it can print close to black.
I approved a brochure cover in this kind of blue from a screen proof once, and the printed version came back darker and less blue than I expected. Since then I always request a physical proof. For large dark fields I also ask the printer about a rich mix with a little extra cyan to keep the blue alive.
If the brand depends on one exact navy, specify a spot ink from a physical swatch book instead of converting a hex code. On warm-white paper, you can also leave the stars unprinted and let the paper act as Star White.
Painting a Night Sky: Gradients, Stars and Glow
Start with the lightest part of the sky, because dark layers are hard to lift. Blend Slate Purple near the horizon into Indigo, then Deep Navy, then Midnight at the top. Glaze thin layers instead of mixing one flat color, and the sky will have depth.

Keep Star White rare. A few small dots with one or two larger stars tell the eye where the light is. If you want a band of Milky Way, a hazy smudged across the middle of the blues reads convincingly. For a ringed planet in the foreground, the pale golds on the Saturn colors page sit well against this palette.
Try this: Sketch a five-stripe sky with these colors, keeping Star White under 5% of the area. Step back three metres. If the stars still pop, your proportions are right.
Warm Accents and Neighbors: Moon, Dusk and Aurora
A night sky palette gets more interesting with one small accent. Moon Glow gives a cooler, silvery highlight than Star White. Ember Peach and Horizon Plum pull the set toward sunset. Aurora Teal adds a modern, electric note.
The base set for dark websites, app interfaces and planetarium-style posters.
Cool teal glow on deep blue, good for tech launches and sleep apps.
Night fading to dusk, useful for event invitations, gradients and album art.
Colder and quieter, suited to winter branding, stationery and calm interiors.
For softer tints of Slate Purple, browse light purple, which gives lavender hex codes that sit naturally above the horizon. If you want to experiment with warmer, brighter combinations, red, blue and purple shows how those three hues can balance.
The palettes below start from the core set and branch into aurora, horizon and moonlit variations. Each has exactly five codes, ready to copy.
Every color in this palette
Night Sky Color Palette: questions people ask
What is the hex code for a night sky color?
A reliable night sky base is #0B1026, a blue-black with RGB 11, 16, 38. For a full sky, add Deep Navy #1B2347, Indigo #3B3B7A, Slate Purple #6A5A9A and Star White #F5F3CE.
What colors go well with night sky blue?
Warm creams like #F5F3CE and #E8E6D8 are the safest match because they read as moonlight and starlight. Soft peach #F2A07B, aurora teal #3FBFA8 and lavender tints also work as small accents.
Is white text readable on a night sky palette?
Yes. Star White #F5F3CE on Midnight #0B1026 measures about 16.7:1, far above the WCAG AA minimum of 4.5:1. Even on Indigo it holds about 8.9:1.
Why use blue-black instead of pure black for a night sky?
Real night skies photograph and paint as deep blue or blue-violet, so a tinted dark looks more natural. It also softens the harsh edge between bright text and a pure black background.
What is the CMYK value of Midnight #0B1026?
A straight formula conversion gives roughly C71 M58 Y0 K85. Treat that as a starting point only, because paper, ink and press change how dark blues print, so ask for a proof.
Keep exploring
- Skin Tone Hex Codes: Realistic Skin Color Palettes
- Summer Color Palettes: Bright and Trendy Schemes
- Cute Colors: Soft and Pretty Color Palettes
- Fair Skin Tone Colors: Hex Codes and Palettes
- Brown Skin Tones: Hex Codes and Color Palettes
- Venus Planet Colors: Palette and Hex Codes
- Honey Blonde Color: Hex Code, RGB and Palettes
- Light Green Color: Hex Code, RGB and Palettes