navy — #000080
#000080
rgb(0, 0, 128) · hsl(240, 100%, 25%) · CSS keyword navy
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| navy on white | 16.01:1 | AA | AA |
| navy on black | 1.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
- darkblue — #00008B
- midnightblue — #191970
- mediumblue — #0000CD
- indigo — #4B0082
- blue — #0000FF
- black — #000000
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
- oldlace — #FDF5E6
- olive — #808000
- olivedrab — #6B8E23
- orange — #FFA500
- orangered — #FF4500
- orchid — #DA70D6
- palegoldenrod — #EEE8AA
- palegreen — #98FB98
- paleturquoise — #AFEEEE
- palevioletred — #DB7093
- papayawhip — #FFEFD5
- peachpuff — #FFDAB9
#000080 in full — tints, shades and harmonies · All named colours · Colour reference