Skip to content

Black

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

Black#000000

Black color codes

  • CSS nameblack
  • HEX#000000
  • RGBrgb(0, 0, 0)
  • HSLhsl(0, 0%, 0%)
  • OKLCHoklch(0% 0 0)
HSB and CMYK values
  • HSB / HSVhsb(0, 0%, 0%)
  • CMYKC0 M0 Y0 K100

White text

21.00:1 · passes WCAG AAA

Black text

1.00:1 · fails WCAG

Shades of black

A lighter shade of black is #222222 (800).

Colors that go with black

Tones

Black has no complementary color: grays, black and white have no hue to turn around the color wheel.

Click a color to copy its hex code.

Colors similar to black

Each compared with black.

About this color

Black in CSS and design

Black is one of the 16 basic color keywords, which come from the VGA palette by way of HTML. These four lines all give the same black:

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

What to know about black

Black text on white has the highest contrast two colors can have, 21:1, three times the 7:1 of WCAG AAA. Black text reaches the 4.5:1 of WCAG AA on 109 of the 139 named colors, from yellow and pink to mid-tones such as gray and coral; white text manages it on the other 30. On a black background, dark named colors such as navy or maroon are close to unreadable.

Black and the other grays

Black is the dark end of the gray scale. As text on black, every gray from slate gray up reaches the 4.5:1 contrast that WCAG AA asks for.

GrayHexLightnessContrast with black
Black#0000000%–
Dark slate gray#2F4F4F40%2.35:1
Dim gray#69696952%3.82:1
Slate gray#70809059%5.17:1
Gray#80808060%5.31:1
Light slate gray#77889962%5.76:1
Dark gray#A9A9A973%8.93:1
Silver#C0C0C081%11.54:1
Light gray#D3D3D387%14.02:1
Gainsboro#DCDCDC89%15.31:1
White smoke#F5F5F597%19.26:1
White#FFFFFF100%21.00:1

Lightness is OKLCH lightness, which follows how light a color looks.

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) and in HSL hsl(0, 0%, 0%). In CMYK it is about C0 M0 Y0 K100, though printed colors vary with paper and ink.

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.

What is the complementary color of black?

Black has no complementary color. A complement is found by turning a color's hue halfway around the color wheel, and grays, black and white have no hue to turn.

Which colors go with black?

As a neutral, black goes with almost any color. Its own tones, from #000000 to #929292, make a calm palette, and a single vivid accent stands out against it.