#000000: pure black color codes, contrast and shades

By TechCompare · Updated · How we check

#000000 is rgb(0, 0, 0), with every channel off. White text on it scores 21.00:1, the highest ratio WCAG 2 allows.

#000000

Color Codes

  • HEX#000000
  • RGBrgb(0, 0, 0)
  • HSLhsl(0, 0%, 0%)
  • OKLCHoklch(0% 0 0)

Text on #000000

White Text

Aa

The quick brown fox jumps over the lazy dog.

21.00:1APCA Lc -107.9

  • AA Normal (4.5:1)Pass
  • AA Large (3:1)Pass
  • AAA Normal (7:1)Pass
  • AAA Large (4.5:1)Pass
Check White Text in Contrast Checker

Black Text

Aa

The quick brown fox jumps over the lazy dog.

1.00:1APCA Lc 0.0

  • AA Normal (4.5:1)Fail
  • AA Large (3:1)Fail
  • AAA Normal (7:1)Fail
  • AAA Large (4.5:1)Fail
Check Black Text in Contrast Checker

WCAG 2 ratios are the same whichever color is the text, so they also hold for #000000 text on a white or black page. APCA is a newer method that isn't part of any WCAG standard, and a minus sign means light text on dark.

#000000 sets red, green and blue to zero, so the screen sends no light. On an OLED screen the pixels switch off entirely. You can also write it as #000 or the CSS name black. The cards above give its codes and test white and black text on it. Nothing is darker, so the shade scale below runs 8 steps up through gray.

Shades

Same hue and chroma in OKLCH, with even steps of lightness. Open any shade in the Color Picker.

  1. #F5F5F5
  2. #CDCDCD
  3. #A7A7A7
  4. #828282
  5. #5F5F5F
  6. #3E3E3E
  7. #202020
  8. #060606
  9. Base#000000

Nearest Named Colors

  • CSS Name

    black

    #000000

    ExactΔE OK 0.000
  • Tailwind 4

    black

    #000000

    ExactΔE OK 0.000
  • Tailwind 3

    black

    #000000

    ExactΔE OK 0.000

About #000000

Many dark themes avoid pure black. Material Design recommends a dark gray, #121212, for dark surfaces, because it can show shadows and lighter raised layers, and it's easier on the eyes than full black behind bright text. White text on #121212 still scores 18.73:1, far past AAA.

The shade scale gives you the same kind of surfaces. #060606 is barely apart from black, and #202020 reads as a dark gray that keeps white text at 16.29:1. White text passes AA up to #5F5F5F, and from #828282 on it needs dark text.

In print, #000000 converts to cmyk(0%, 0%, 0%, 100%), black ink only. Large black areas printed that way can look flat and gray, so printers often use rich black, which adds cyan, magenta and yellow under the black for a deeper tone.

Verdict

Use #000000 for text on light backgrounds, where it gets the full 21.00:1 against white. For dark mode backgrounds, consider a near black like #121212 or the second step of the shade scale instead, and save pure black for OLED focused designs where switching pixels off matters.

Click a shade to open it in the Color Picker.

More Color scenarios

Hex to RGB
A hex color code is three RGB numbers written in base 16.
View details
RGB vs CMYK
Screens add light and print adds ink. See one color in both, and why a plain CMYK formula can't promise a print match.
View details
HSL color model
Hue, saturation and lightness, with three live sliders and a table of common colors in hex, RGB and HSL.
View details

Frequently asked questions

What color is #000000?
Pure black: rgb(0, 0, 0), hsl(0, 0%, 0%) or oklch(0% 0 0). The CSS name is black, and #000 is the same color.
Should I use #000000 for dark mode?
It works, but many design systems use a dark gray instead. Material Design suggests #121212, which still gives white text 18.73:1 and leaves room for lighter raised surfaces.
What's #000000 in CMYK?
cmyk(0%, 0%, 0%, 100%), black ink only. For deep blacks in print, designers often use rich black, which mixes in cyan, magenta and yellow as well.