Guides/Navy blue hex code: #000080, with RGB, CMYK and color code
Navy blue hex code: #000080, with RGB, CMYK and color code
The navy blue hex code is #000080, which is rgb(0, 0, 128). It is also the navy blue color code CSS calls 'navy'. Copy it in HEX, RGB, HSL or CMYK from the table below.
Navy blue color code in HEX, RGB, HSL, HSV and CMYK
Copy whichever format your tool asks for. Every value below was computed by code from the single hex value #000080, so the formats always agree with each other.
Navy blue color code in HEX, RGB, HSL, HSV and CMYK
Format
Value
HEX
#000080
RGB
rgb(0, 0, 128)
HSL
hsl(240, 100%, 25%)
HSV
240, 100%, 50%
CMYK
100%, 100%, 0%, 50% (simple conversion)
Checklist
Which format do I need?
Pick the format by where the colour will be used.
Website or CSS: use HEX (#000080) or rgb(0, 0, 128).
Slides, video and other work on a screen: use RGB.
Print: use CMYK as a starting figure, then ask the printer for a proof.
Making your own lighter or darker navy: use HSL and change the last two numbers.
In depth
Navy blue RGB and navy blue CMYK in plain words
Navy blue RGB is 0, 0, 128. That means no red light, no green light and half of the blue. This is why navy is so dark.
Navy blue CMYK is 100%, 100%, 0%, 50% in the simple conversion. That means full cyan and magenta, no yellow and half black. Ink and paper change the real result, so take it as a starting point.
Checklist
Is #000080 the official navy blue?
It is official only in one sense: #000080 is the value the W3C CSS Color Module gives for the named colour "navy", so writing color: navy in a stylesheet produces exactly this blue. Outside CSS there is no single official navy blue code. Other organisations define their own navy, and their codes differ from #000080.
So treat #000080 as the web-standard navy. If you are matching a specific brand or a printed item, take the code from that brand guide, not from a general colour page.
In CSS: color: navy; or color: #000080; give the same result.
Navy has no green and no red: all of the colour comes from the blue channel at 128 of 255.
Because only blue is present, the colour sits at hue 240 in HSL, the same hue as pure blue, just much darker.
Reference
Navy blue and dark blue are not the same code
People say navy, dark blue and midnight blue as if they were one colour. CSS gives each its own code. The last column is how far each one is from navy in RGB, as a straight-line distance on the 0 to 255 scale.
darkblue (#00008B) is the closest. Only the blue channel changes, from 128 to 139.
midnightblue (#191970) adds 25 of red and 25 of green, so it is a softer, greyer blue.
mediumblue (#0000CD) and blue (#0000FF) are much brighter. Both still pass 4.5:1 with white text.
Navy blue and dark blue are not the same code
CSS name
HEX
RGB
HSL
On white
Distance from navy
navy
#000080
rgb(0, 0, 128)
hsl(240, 100%, 25%)
16.01:1
0
darkblue
#00008B
rgb(0, 0, 139)
hsl(240, 100%, 27%)
15.30:1
11
midnightblue
#191970
rgb(25, 25, 112)
hsl(240, 64%, 27%)
14.85:1
39
mediumblue
#0000CD
rgb(0, 0, 205)
hsl(240, 100%, 40%)
11.16:1
77
blue
#0000FF
rgb(0, 0, 255)
hsl(240, 100%, 50%)
8.59:1
127
Reference
8 navy blue variants with their hex codes
The table lists the variants this page computes from #000080, described by how they were made and not given invented colour names. Tints blend navy with white, shades blend it with black, and the muted version blends it with 40 percent mid grey (#808080). The last two turn the hue 12 degrees either way in HSL and leave saturation and lightness unchanged.
8 navy blue variants with their hex codes
How it was computed
HEX
RGB
HSL
Tint, 25% white
#4040A0
rgb(64, 64, 160)
hsl(240, 43%, 44%)
Tint, 50% white
#8080C0
rgb(128, 128, 192)
hsl(240, 34%, 63%)
Tint, 75% white
#BFBFDF
rgb(191, 191, 223)
hsl(240, 33%, 81%)
Shade, 25% black
#000060
rgb(0, 0, 96)
hsl(240, 100%, 19%)
Shade, 50% black
#000040
rgb(0, 0, 64)
hsl(240, 100%, 13%)
Muted, 40% grey
#333380
rgb(51, 51, 128)
hsl(240, 43%, 35%)
Hue shifted +12 degrees
#1A0080
rgb(26, 0, 128)
hsl(252, 100%, 25%)
Hue shifted -12 degrees
#001A80
rgb(0, 26, 128)
hsl(228, 100%, 25%)
Checklist
Copy-ready CSS for navy blue and its variants
Paste these custom properties into a stylesheet. The comments repeat how each value was computed.
--navy: #000080;
--navy-1: #4040A0; /* tint, 25% white */
--navy-2: #8080C0; /* tint, 50% white */
--navy-3: #BFBFDF; /* tint, 75% white */
--navy-4: #000060; /* shade, 25% black */
--navy-5: #000040; /* shade, 50% black */
--navy-6: #333380; /* muted, 40% grey */
--navy-7: #1A0080; /* hue shifted +12 degrees */
--navy-8: #001A80; /* hue shifted -12 degrees */
Reference
Navy blue contrast: which text colour to use
WCAG 2.1 defines contrast as (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter colour and L2 that of the darker one, and says ratios range from 1 to 21. Success criterion 1.4.3 asks for 4.5:1 for normal text and 3:1 for large text, and 1.4.11 asks for 3:1 for the visible parts of interface components such as button edges and icons.
Plain #000080 against white scores 16.01:1, a comfortable pass, so white text on a navy background is safe at any size. Against black it scores only 1.31:1, which fails both thresholds, so never put black text or a black icon on navy.
Use white text on #000080 and on these six variants: #4040A0, #000060, #000040, #333380, #1A0080 and #001A80 all pass 4.5:1 against white.
#8080C0 is the crossover: 3.64:1 on white is only fine for large text, while 5.77:1 on black passes for normal text.
Use black text on #BFBFDF (11.73:1) when you want a pale navy tint as a background.
Navy blue contrast: which text colour to use
Colour
HEX
On white
White text result
On black
Black text result
Navy (main)
#000080
16.01:1
Passes 4.5:1
1.31:1
Fails 3:1
Tint, 25% white
#4040A0
8.54:1
Passes 4.5:1
2.46:1
Fails 3:1
Tint, 50% white
#8080C0
3.64:1
Large text and UI parts only (3:1)
5.77:1
Passes 4.5:1
Tint, 75% white
#BFBFDF
1.79:1
Fails 3:1
11.73:1
Passes 4.5:1
Shade, 25% black
#000060
17.97:1
Passes 4.5:1
1.17:1
Fails 3:1
Shade, 50% black
#000040
19.55:1
Passes 4.5:1
1.07:1
Fails 3:1
Muted, 40% grey
#333380
10.90:1
Passes 4.5:1
1.93:1
Fails 3:1
Hue shifted +12 degrees
#1A0080
15.49:1
Passes 4.5:1
1.36:1
Fails 3:1
Hue shifted -12 degrees
#001A80
14.39:1
Passes 4.5:1
1.46:1
Fails 3:1
Reference
Colours that go with navy blue: four computed palettes
These palettes rotate the hue of #000080 around the HSL colour wheel, keeping saturation at 100% and lightness at 25%. That means every partner colour is just as dark as navy, so on a real page you will usually lighten one or two of them.
Colours that go with navy blue: four computed palettes
Scheme
Hue rotation from the main colour
Codes
Complementary
180 degrees
#808000
Analogous
+30 and -30 degrees
#004080, #400080
Triadic
+120 and +240 degrees
#800000, #008000
Split-complementary
+150 and +210 degrees
#804000, #408000
In depth
Ways to use navy blue
On screens, navy can serve as a header, footer, sidebar or primary button colour, because white text on it passes the 4.5:1 line with plenty of room. You could also try it as a dark page background in place of pure black, then check each text colour against it in the contrast table above.
For a logo or letterhead, navy is one option when you want a dark colour that is not black. How it feels depends on the colours and type around it, so judge it in context rather than from the code alone.
For interiors and fabric, a screen code is only a starting point: paint, cloth and lighting change how navy looks, so match the code against a physical sample. For print, the CMYK values above come from a simple conversion, and a print shop working from an ICC profile will give slightly different numbers.
Step by step
Try it now: pull a navy out of a logo photo
Say you have a photo of a logo or a signboard and want to know which navy it really is. The color-palette-from-image tool finds the dominant colours of a picture with a median-cut method and returns 2 to 12 of them. It runs on your device, so the photo stays with you. The hex-to-rgb tool then converts any code between HEX, RGB and HSL (3 or 6 digit hex, rgb() and hsl() input, or the colour picker) and shows the WCAG contrast of that colour on white and on black.
1
Open color-palette-from-image and load the photo.
2
Choose how many colours to extract. A few more than you expect can help, because a dark navy may otherwise be merged with other dark tones.
3
Click a pixel inside the navy area to read its exact code, or copy the extracted set as CSS variables.
4
Paste the code into hex-to-rgb and compare it with #000080: if the red and green values are near 0 and blue is near 128, it is close to the standard navy.
5
Read the contrast shown on white and on black to decide the text colour.
Limit: the photo shows the colour as lit and as your screen displays it, so a sampled navy can differ from the true brand colour. For brand work, take the code from the brand guide.
In depth
How this guide was made
The code for navy was checked in the W3C CSS Color Module Level 4 list of named colours on 14 November 2026. The codes for darkblue, midnightblue, mediumblue and blue were read from the same list on 17 November 2026. The RGB, HSL, HSV and CMYK values, the variants, the palettes, the distances and the contrast ratios were calculated from the hex codes with a short script, using the W3C contrast formula.
This page was drafted with AI assistance and its values were recalculated in an automated check before publishing. No figure was copied from another colour site. CMYK values are a simple conversion and are not a print profile, so ask your printer for a proof.
In pictures
See it
Navy blue, #000080, as a flat swatch. The same colour is rgb(0, 0, 128) in RGB.The main colour and the eight variants from the table above. Each tile carries its hex code and the method that produced it.The HEX to RGB and HSL converter with #000080 entered. It returns the other formats and the contrast against white and black.
FAQ
Frequently asked questions
Short answers to what people ask most about this topic.
The navy blue hex code is #000080. It is the CSS named colour navy, equal to rgb(0, 0, 128). Searches for navy blue hex lead to the same value. Other organisations define their own navy blues, and their codes differ.
What is the navy blue color code?
It is #000080, the same value as the hex code. A color code is just the value you type into a design tool or a stylesheet. In CSS you can also write the word navy.
What is the RGB value of navy blue?
The navy blue RGB code is rgb(0, 0, 128): red 0, green 0 and blue 128. In HSL it is hsl(240, 100%, 25%), and in HSV it is 240, 100%, 50%.
What is the CMYK value of navy blue?
A simple conversion of #000080 gives 100% cyan, 100% magenta, 0% yellow and 50% black. Treat it as a starting point, because a print shop using an ICC colour profile will get different numbers for the same colour.
Is navy blue the same as dark blue?
Not in CSS. Navy is #000080 and the named colour darkblue is #00008B, which has a little more blue (139 against 128). In everyday speech people use the two words loosely, so ask for the code when it matters.
Does white text work on navy blue?
Yes. White on #000080 has a contrast ratio of 16.01:1, well above the WCAG 4.5:1 minimum for normal text. Black on navy is only 1.31:1 and fails.