Black #000000

Black color (#000000)

Black is one of the 148 CSS named colors. Use the keyword black anywhere CSS accepts a color, or its hex code #000000, which is rgb(0, 0, 0) in RGB.

It is a very dark neutral and a perceived lightness of 0% in OKLCH. On a black background, white text gives the higher contrast at 21.00:1, which passes WCAG AA for normal text.

Black color codes

CSS name black
HEX #000000
HEX (8-digit) #000000FF
RGB rgb(0, 0, 0)
HSL hsl(0, 0%, 0%)
HSV / HSB hsv(0, 0%, 0%)
OKLCH oklch(0% 0 0)
CMYK cmyk(0%, 0%, 0%, 100%)

Contrast with white and black

WCAG 2 contrast ratios and APCA lightness contrast (Lc) for black used as text and as a background.

Aa Sample text
Black text on white
21.00:1 WCAG Lc 106 APCA Passes AA
Aa Sample text
Black text on black
1.00:1 WCAG Lc 0 APCA Fails AA
Aa Sample text
White text on black
21.00:1 WCAG Lc -107.9 APCA Passes AA
Aa Sample text
Black text on black
1.00:1 WCAG Lc 0 APCA Fails AA

Tints and shades of black

Tints mix black with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.

Tints

Shades

Colors that go with black

Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.

Complementary

Analogous

Triadic

Split-Complementary

Black with color blindness

Approximately how black appears with each type of color vision deficiency. Test full designs with the color blindness simulator.

Using black in CSS

.element {
  color: black;
  background-color: #000000;
  border-color: rgb(0 0 0 / 50%);
  outline-color: oklch(0% 0 0);
}

Similar named colors

See all shades of gray or browse every CSS color name.

Related tools