Toolman

navy — #000080

#000080

rgb(0, 0, 128) · hsl(240, 100%, 25%) · CSS keyword navy

Can you put text on it?

ContrastBody textLarge text
navy on white16.01:1AAAA
navy on black1.31:1

As a background, navy takes white text: 16.01:1 against 1.31:1 the other way. A colour picker will give you the hex and stop there, which is why so many palettes look right and fail an accessibility audit.

Where the name comes from

From the dark blue of British Royal Navy uniforms, adopted in 1748.

Using it

color: navy;
color: #000080;
color: rgb(0 0 128);

All three are the same colour. The keyword is one of the 141 CSS named colours — a list settled in CSS 2.1 and added to exactly once since, when rebeccapurple was standardised in 2014.

Colours close to navy

Frequently asked questions

What is the hex code for navy?

The hex code for navy is #000080 — RGB 0, 0, 128.

Can I use navy for text?

Yes. navy reaches 16.01:1 against white, past the 4.5:1 that WCAG AA asks for body text.

Should text on navy be black or white?

White — 16.01:1 against 1.31:1 the other way.

Other named colours

#000080 in full — tints, shades and harmonies · All named colours · Colour reference