Skip to content

Black

Black is pure black, the darkest possible color. Hex code #000000.

Black#000000

Color codes

  • CSS nameblack
  • HEX#000000
  • RGBrgb(0 0 0)
  • HSLhsl(0 0% 0%)
  • HSB / HSVhsb(0, 0%, 0%)
  • OKLCHoklch(0% 0 0)
  • CMYKcmyk(0%, 0%, 0%, 100%)

White text

21.00:1 · passes WCAG AAA

Black text

1.00:1 · fails WCAG

Shades

50#F2F2F2
100#D4D4D4
200#B8B8B8
300#9C9C9C
400#828282
500#686868
600#4F4F4F
700#383838
800#222222

Tones

#000000
#2E2E2E
#4D4D4D
#6F6F6F
#929292

About this color

Black in CSS and design

Black is pure black, the darkest possible color. Black is one of the 16 basic color keywords, which go back to HTML 4, long before CSS had 148 named colors.

Pure black text on pure white has the maximum contrast of 21:1. Many designs soften it slightly, for example to a very dark gray.

Use it in CSS by name or by any of its codes; these all give the same color:

color: black;
color: #000000;
color: rgb(0 0 0);
color: hsl(0 0% 0%);

For text on black, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.

Frequently asked questions

What is the hex code for black?

#000000. In CSS you can also use the keyword black, which works in every browser.

What is black in RGB and HSL?

In RGB it is rgb(0 0 0), in HSL hsl(0 0% 0%). For print, cmyk(0%, 0%, 0%, 100%) is a starting point, but CMYK depends on paper and ink, so check with your printer.

Should I use black or white text on black?

White text works better: it has a contrast ratio of 21.00:1 and passes WCAG AAA. Black text reaches 1.00:1.

Which colors go with black?

As a neutral, black goes with almost any color. It works well as a background, border or text color next to a vivid accent, and with the lighter and darker tones from its shades.