Black
Black is pure black, the darkest possible color. Hex code #000000.
Black color codes
- CSS name
black - HEX
#000000 - RGB
rgb(0, 0, 0) - HSL
hsl(0, 0%, 0%) - OKLCH
oklch(0% 0 0)
HSB and CMYK values
- HSB / HSV
hsb(0, 0%, 0%) - CMYK
C0 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
- Dim gray#696969
Much lighter
- Gray#808080
Much lighter
- Dark gray#A9A9A9
Much lighter
- Silver#C0C0C0
Much lighter
- Light gray#D3D3D3
Much lighter
- Gainsboro#DCDCDC
Much lighter
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.
| Gray | Hex | Lightness | Contrast with black |
|---|---|---|---|
| Black | #000000 | 0% | – |
| Dark slate gray | #2F4F4F | 40% | 2.35:1 |
| Dim gray | #696969 | 52% | 3.82:1 |
| Slate gray | #708090 | 59% | 5.17:1 |
| Gray | #808080 | 60% | 5.31:1 |
| Light slate gray | #778899 | 62% | 5.76:1 |
| Dark gray | #A9A9A9 | 73% | 8.93:1 |
| Silver | #C0C0C0 | 81% | 11.54:1 |
| Light gray | #D3D3D3 | 87% | 14.02:1 |
| Gainsboro | #DCDCDC | 89% | 15.31:1 |
| White smoke | #F5F5F5 | 97% | 19.26:1 |
| White | #FFFFFF | 100% | 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.