#000080 — Navy

Navy is the CSS named color #000080 — rgb(0, 0, 128), hsl(240, 100%, 25%). Its relative luminance is 0.016, giving 16.01:1 against white and 1.31:1 against black, so it works as a text color on white.

Navy in every notation

HEX#000080
RGBrgb(0, 0, 128)
HSLhsl(240, 100%, 25%)
Relative luminance0.0156
Contrast on white16.01:1 AA pass
Contrast on black1.31:1 AA fail

Tints and shades of navy

#D9D9EC
#A6A6D3
#6666B3
#2E2E97
#000080
#00006D
#000057
#000040
#000029

Built by mixing navy toward white (four steps) and toward black (four steps) while keeping the hue. Use the shades generator for a different step count or to add harmony sets.

Similar CSS colors

Closest by CIELAB distance (ΔE76). For perceptual matching in a design system, compare in OKLab before locking a token.

Frequently asked questions

What is the hex code for navy?

navy is #000080, which is rgb(0, 0, 128) and hsl(240, 100%, 25%). It is one of the 148 CSS named colors defined by the CSS Color Module Level 4.

Is navy light or dark?

Navy has a relative luminance of 0.016 on a 0–1 scale, so it is a dark color. Against white it scores 16.01:1; against black, 1.31:1.

Can I use navy for text?

navy reaches 16.01:1 against white, which clears WCAG 2.2 AA for normal text (4.5:1) at any size.