CSS named color

Navy #000080

navy rgb(0, 0, 128)

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)—
RGBrgb(0, 0, 128)
RGBArgba(0, 0, 128, 1)
8-digit HEX#000080FF
HSLhsl(240, 100%, 25%)
HSV / HSB240°, 100%, 50%
CMYK100%, 100%, 0%, 50%
RGB 0–10, 0, 0.502
Decimal128
CSS keywordnavy

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

TextBackgroundRatioWCAG 2.x
White Navy 16.00:1AAA
Black Navy 1.31:1Fail

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.

Copied!