Dark Blue Hex Code: #00008B, Navy Midnight Shades
Dark blue hex code is #00008B (RGB 0,0,139). Compare navy, midnight blue, contrast ratios, and pairing tips in this quick guide.

The dark blue hex code is #00008B, which equals rgb(0, 0, 139) and hsl(240, 100%, 27%). It's the official CSS named color darkblue. Need something slightly darker? Use navy (#000080). Want a hint of purple? Use midnight blue (#191970).
Here's the thing though. Picking the right shade matters more than you'd think, so let me walk you through it.

Dark Blue Hex Codes at a Glance
Before we dig in, you probably want the numbers fast. So here's the cheat sheet I keep open on my second monitor. Every value below comes from the CSS color spec on MDN, Wikipedia's color pages, or my own WCAG math. Save it, and you'll skip a dozen open tabs next time.
Shade | Hex code | RGB | Contrast on white (approx.) |
|---|---|---|---|
Dark blue |
| 0, 0, 139 | 15.3:1 |
Navy blue |
| 0, 0, 128 | 16.0:1 |
Midnight blue |
| 25, 25, 112 | 14.9:1 |
Oxford blue |
| 0, 33, 71 | very high |
Web safe dark blue |
| 0, 0, 136 | 15.5:1 |
All of these clear the WCAG 4.5:1 minimum for body text by a wide margin. That's a big win for accessibility, and it's one reason so many brands lean on this color family for text and buttons alike. If you're also mapping out a full palette for a carousel or slide deck, it helps to understand how color psychology affects clicks before you commit to a final scheme.
What Is the Dark Blue Hex Code?
Let me keep this simple. A hex code is a six digit hexadecimal color value that tells a screen how much red, green, and blue to mix. You can make 16,777,216 colors this way. Wild, right?
For dark blue, red and green are switched off. Only the blue channel is on, at 139 out of 255. That single channel purity is why the color feels clean and serious.
For print, the CMYK mix is 100, 100, 0, 45, according to Picsart's color reference. You can also write #00008B in CSS as darkblue, rgb(0 0 139), or hsl(240 100% 27%).
Dark Blue vs. Navy vs. Midnight Blue
This is where people trip up. All three look nearly identical on screen, yet CSS treats them as separate colors. Visily's breakdown points out that dark blue is only about 8% brighter than navy.
Navy is the darkest of the three. The name comes from Royal Navy uniforms, first regulated for officers in 1748.
Dark blue is a touch brighter, with a faint luminous edge.
Midnight blue adds a subtle violet cast. It's named after a moonlit night sky.
Honestly, most visitors can't tell them apart. But your design system can. So pick one anchor shade and stick with it.
Which Dark Blue Should You Pick?
Choosing feels harder than it is. I use a simple rule: match the shade to the feeling you want. Below is my quick decision guide, and it's saved me from second guessing more than once. Read it, choose, and move on.
Pick
#00008Bif you want a pure, authoritative deep blue for buttons, headers, or logos.Pick
#000080if you want the classic navy look for formal, corporate, or heritage brands.Pick
#191970if you want a softer, slightly mysterious night sky blue.Pick
#002147(Oxford blue) if you want a greener, academic feel.
Not sure? Start with #00008B. It's the safest all rounder.
What Does Dark Blue Say About Your Brand?
Colors talk before your words do. Visitors judge you in a blink, and dark blue signals competence. I've seen it lift trust on product pages again and again. So let's look at what the research says, and why you should use it on purpose.
Bluebird Branding links dark blue with expertise, stability, and professionalism. QuillBot adds trustworthiness, competency, and luxury. And per the Pantone Color Institute, as reported by Ofspace, blue is the most widely used branding color worldwide.
There's a catch. Darker tones can feel cold or sad if you overdo them. So add warmth with white, ivory, or gold accents.
How to Use Dark Blue: A Step by Step Guide
Theory's nice, but you want a process you can run today. This is the five step method I follow on every project, and it takes about ten minutes. Follow it in order, and you'll dodge most of the mistakes I see. If you're working directly with images rather than code, a solid free photo editing tool makes it easy to sample and apply these exact hex values to your graphics.
Pick one anchor shade. Choose
#00008Bor#000080, not both.Add neutrals and one accent. White (
#FFFFFF), light gray, and maybe gold.Save it as a CSS variable. Put
:root { --dark-blue: #00008B; }in your stylesheet, so one edit updates everything.Test your contrast ratio. Use the WebAIM Contrast Checker. Dark blue text on white passes easily, but dark blue on a dark background fails fast.
Check real screens. Navy family blues can look almost black on OLED displays, so test on a phone.
Best Colors to Pair With Dark Blue
Now for the fun part. A great dark blue color palette needs the right partners. I've tested plenty, and a few combinations win every time. Use these as starting points, then tweak to fit your brand.
White (
#FFFFFF): stark, clean contrast, per Figma's navy page.Gold or antique gold: premium and regal.
Emerald green (
#00674F): luxurious, per Figma.Olive (
#808000): navy's computed complement, per Visily.Soft gray or ivory: calm, readable neutrals.
Dark Blue Hex Code FAQ
Quick questions come up constantly, so here are straight answers you can skim in seconds.
What is the hex code for dark blue? It's #00008B, the CSS named color darkblue.
Is navy the same as dark blue? No. Navy is #000080, and dark blue is #00008B. They're separate CSS colors, about 11 points apart on the blue channel.
What is the RGB value of dark blue? It's rgb(0, 0, 139).
What is the hex code for midnight blue? It's #191970, or rgb(25, 25, 112).
Is dark blue accessible for text? Yes. Dark blue on white is roughly 15:1, far above the WCAG AA minimum of 4.5:1.
What is the CMYK for dark blue? It's roughly C100, M100, Y0, K45.
Ready to Put Dark Blue to Work?
Here's my honest take. Trust is the hardest thing to earn online, and dark blue hands you a head start. It's the color people already link with reliability, which is exactly what someone needs to feel right before they buy.
So don't overthink it. Choose #00008B, build your palette, and apply it to your product page, packaging, and checkout button. Your product deserves a color that works as hard as you do.
About the Author

Laura Whitmore
Laura Whitmore is an Instagram content strategist and visual design writer at Postunreel, specializing in carousel post design, visual storytelling, and audience engagement tactics for Instagram and other image-first platforms. She brings four years of experience working with lifestyle brands, e-commerce businesses, and independent creators who want their social media content to look polished and perform consistently. Laura combines her passion for great design with a data-driven approach to content, regularly testing new carousel formats and visual styles to discover what drives the highest engagement rates for Postunreel users.
🔥 Limited Time Deal
NewGet lifetime access to Postunreel with a one-time payment. Never pay again!
Your Go-To Solution for Stunning Carousels using AI!
Postunreel is a free AI carousel generator tool that helps you design captivating carousel posts for LinkedIn, Instagram, and other platforms. It makes it easier to increase social media engagement and grow your audience.
Create Free Carousel Now 🚀Related Blogs
Best Free Photo Editing Software in 2026
Find best free photo editing software in 2026. Compare Affinity, GIMP, darktable, Photopea and Paint.NET, with edit workflow for bloggers.
How to Improve Focus in Photos: 11 Fixes
Blurry photos? Learn how to improve focus in photos with 11 proven fixes, from autofocus modes to focus stacking. Get sharper shots.