black — #000000
#000000
rgb(0, 0, 0) · hsl(0, 0%, 0%) · CSS keyword black
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| black on white | 21:1 | AA | AA |
| black on black | 1:1 | — | — |
As a background, black takes white text: 21:1 against 1: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.
Using it
color: black;
color: #000000;
color: rgb(0 0 0);
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 black
- navy — #000080
- midnightblue — #191970
- darkblue — #00008B
- indigo — #4B0082
- mediumblue — #0000CD
- maroon — #800000
Frequently asked questions
What is the hex code for black?
The hex code for black is #000000 — RGB 0, 0, 0.
Can I use black for text?
Yes. black reaches 21:1 against white, past the 4.5:1 that WCAG AA asks for body text.
Should text on black be black or white?
White — 21:1 against 1:1 the other way.
Other named colours
- blanchedalmond — #FFEBCD
- blue — #0000FF
- blueviolet — #8A2BE2
- brown — #A52A2A
- burlywood — #DEB887
- cadetblue — #5F9EA0
- chartreuse — #7FFF00
- chocolate — #D2691E
- coral — #FF7F50
- cornflowerblue — #6495ED
- cornsilk — #FFF8DC
- crimson — #DC143C
#000000 in full — tints, shades and harmonies · All named colours · Colour reference