Black Hex Code #000000
Black is pure black, the darkest color a screen can show, with the hex code #000000. In RGB it is 0, 0, 0, and in HSL it is 0°, 0%, 0%. It is one of the 148 named colors in CSS, so you can write “black” instead of the hex code.
- HEX
- #000000
- RGB
- rgb(0, 0, 0)
- HSL
- hsl(0, 0%, 0%)
- HSV
- hsv(0°, 0%, 0%)
- CMYK
- cmyk(0%, 0%, 0%, 100%)
- CSS name
- black
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Black
On a white background Black has a contrast ratio of 21.00:1 (AAA), and on black 1.00:1 (Fail). White text is the better choice on top of it.
It has almost no hue of its own, so it pairs comfortably with almost any accent color.
Grays do much of the quiet work in interface design: text, borders, backgrounds and disabled states. Because they carry no strong hue, they pair with almost any accent color.
Good to know: Black (#000000) has a relative luminance of 0 and gives the highest possible contrast against white, 21:1. Pure black text on pure white can feel harsh over long reading, so many designers use a very dark gray instead.
Shades and tints of Black
Tints mix Black with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Pairing Black with an accent color
Black has almost no hue of its own, so color schemes built from it would all look the same. A neutral works best as a background or text color beside an accent. This is how six accent colors contrast with Black.
- Crimson #DC143C 4.21:1 against Black (WCAG AA Large)
- Dark Orange #FF8C00 9.00:1 against Black (WCAG AAA)
- Gold #FFD700 14.97:1 against Black (WCAG AAA)
- Sea Green #2E8B57 4.95:1 against Black (WCAG AA)
- Royal Blue #4169E1 4.33:1 against Black (WCAG AA Large)
- Dark Orchid #9932CC 3.68:1 against Black (WCAG AA Large)
Black contrast and accessibility
WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Black scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 21.00:1 | ✓ Pass | ✓ Pass | ✓ Pass | ✓ Pass |
| Black (#000000) | 1.00:1 | ✕ Fail | ✕ Fail | ✕ Fail | ✕ Fail |
Black and color blindness
These are approximate previews of how Black can look with the main types of color vision deficiency.
Black looks almost the same.
Black looks almost the same.
Black looks almost the same.
Black looks almost the same.
Gradients with Black
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Black to a lighter tint
background: linear-gradient(135deg, #000000 0%, #999999 100%); Black to Dark Orange
background: linear-gradient(135deg, #000000 0%, #ff8c00 100%); Colors similar to Black
How each close match differs from Black.
Use Black in code
.element {
color: #000000;
background-color: #000000;
border-color: black; /* black is a valid CSS color name */
} :root {
--color-black: #000000;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#000000] text-[#000000] border-[#000000]"></div>
/* Tailwind v4 theme color */
@theme {
--color-black: #000000;
} Black questions
What is the hex code for Black?
The hex code for Black is #000000. In RGB that is rgb(0, 0, 0), and in HSL it is hsl(0, 0%, 0%).
Which colors go well with Black?
Black is a neutral color with almost no hue of its own, so it has no true complement and pairs with nearly any accent. The accents that contrast most strongly against it are Gold (14.97:1), Dark Orange (9.00:1), Sea Green (4.95:1).
Should I use white or black text on Black?
White text. It has a contrast ratio of 21.00:1 against Black, which is WCAG AAA. The other option scores 1.00:1.
Is Black accessible as a text color on white?
Yes. Black on white scores 21.00:1, which passes WCAG AA for normal text (4.5:1) and AAA (7:1).
What are darker and lighter shades of Black?
Mixing Black with black gives #000000, #000000, #000000, #000000 (20% to 80% black). Mixing it with white gives #333333, #666666, #999999, #CCCCCC (20% to 80% white).