Black color codes
| CSS name | black |
|---|---|
| HEX | #000000 |
| RGB | rgb(0, 0, 0) |
| HSL | hsl(0, 0%, 0%) |
| CMYK | cmyk(0%, 0%, 0%, 100%) |
| Decimal | 0 |
Shades of Black (darker)
#000000 · #000000 · #000000 · #000000 · #000000 · #000000 · #000000 · #000000 · #000000
Tints of Black (lighter)
#1A1A1A · #333333 · #4D4D4D · #666666 · #808080 · #999999 · #B3B3B3 · #CCCCCC · #E6E6E6
Color harmonies
| Complementary | #000000 |
|---|---|
| Triadic | #000000, #000000 |
| Analogous | #000000, #000000 |
Accessibility (WCAG contrast)
| White text on Black | 21.00:1 · AAA |
|---|---|
| Black text on Black | 1.00:1 · Fail |
Use Black in code
.element {
color: black; /* or #000000 */
background-color: rgb(0 0 0 / 0.5);
}Frequently asked questions
What is the hex code for Black?
Black is #000000 in HEX, rgb(0, 0, 0) in RGB and hsl(0, 0%, 0%) in HSL.
Can I use "black" directly in CSS?
Yes. "black" is one of the 148 standard CSS named colors, so color: black; works in every browser.
Is Black readable on white?
The contrast ratio of Black on white is 21.00:1 (WCAG AAA). On black it is 1.00:1 (Fail).
What is the complementary color of Black?
The complementary color (opposite on the color wheel) is #000000.
Similar colors
Dark Green#006400Midnight Blue#191970Dark Slate Gray#2F4F4FDark Slate Grey#2F4F4FGreen#008000Maroon#800000Navy#000080Dark Blue#00008B
Convert any color with the Color Converter, generate palettes with the Random Color Generator, or browse all 148 CSS color names.