CSS named color
Navy #000080
Navy is a dark blue with the hex code #000080, which converts to rgb(0, 0, 128). Open #000080 in the converter to tweak it.
Navy color values
| HEX | #000080 |
|---|---|
| HEX (shorthand) | — |
| RGB | rgb(0, 0, 128) |
| RGBA | rgba(0, 0, 128, 1) |
| 8-digit HEX | #000080FF |
| HSL | hsl(240, 100%, 25%) |
| HSV / HSB | 240°, 100%, 50% |
| CMYK | 100%, 100%, 0%, 50% |
| RGB 0–1 | 0, 0, 0.502 |
| Decimal | 128 |
| CSS keyword | navy |
How #000080 converts to RGB
Split the hex code into three pairs and read each pair as a base-16 number: 00 → 0, 00 → 0, 80 → 128. That gives rgb(0, 0, 128). The step-by-step guide explains the math.
Shades of Navy
Mixed toward black in 10% steps. Click a swatch to copy its hex.
Tints of Navy
Mixed toward white in 10% steps.
Color harmonies
Hue rotations of Navy on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.
Complementary
Analogous
Split-complementary
Triadic
Tetradic (square)
Contrast and accessibility
| Text | Background | Ratio | WCAG 2.x |
|---|---|---|---|
| White | Navy | 16.00:1 | AAA |
| Black | Navy | 1.31:1 | Fail |
Use white text on a navy background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.
Use Navy in CSS
.element {
color: navy; /* keyword */
background-color: #000080; /* hex */
border-color: rgb(0 0 128 / 50%); /* 50% transparent */
}
Need it semi-transparent? Append an alpha byte: #00008080 is Navy at 50% opacity. See RGBA & transparency.
Similar named colors
FAQ
What is the HEX code for Navy?
The CSS named color navy is #000080 in hexadecimal. In CSS you can write color: navy; or color: #000080; — both produce the same pixel.
What is Navy in RGB?
Navy is rgb(0, 0, 128): red 0, green 0, blue 128 on the 0–255 scale. As normalized 0–1 floats that is (0, 0, 0.502).
Is white or black text more readable on Navy?
White text is more readable. White on #000080 has a contrast ratio of 16.00:1 (AAA), black on #000080 has 1.31:1 (Fail). WCAG AA needs 4.5:1 for normal text.