Black, white text passes AA
What color is black?
black is black: #000000 in hex, rgb(0 0 0). White text on it reaches 21.00:1, passing WCAG AAA. Recolor (recolor.page) shows it on a real page below.
Last updated
| Format | Value |
|---|---|
| Keyword | black |
| Hex | #000000 |
| RGB | rgb(0 0 0) |
| HSL | hsl(0 0% 0%) |
| OKLCH | oklch(0.0% 0.000 none) |
| Nearest Tailwind color | gray-950 #030712, 0.132 away in OKLab |
| White text | 21.00:1: AA passes, AAA passes, large text passes |
| Black text | 1.00:1: AA fails, AAA fails, large text fails |
About black
Measured in OKLCH, black comes out at lightness 0.0%, chroma 0.000 and no hue: black. It is one of the 16 named colors that CSS Color 4 traces to the VGA palette, by way of HTML; most of the others came from the X11 color system.
HSL and OKLCH agree on how light it is, 0% and 0.0%. No CSS named color comes near it: the closest, midnightblue (#191970), is 0.322 away in OKLab.
White on black reads at 21.00:1, enough for AAA body text; black reaches 1.00:1 and should stay off it. It sits at one end of the hue-sorted table of named colors, next to dimgray.
In Tailwind CSS 4.3.3 the nearest default color is gray-950 (#030712), 0.132 away in OKLab; for the exact color, an arbitrary value such as bg-[#000000] works.
Tints and shades
- #c8c8c8
- #949494
- #636363
- #363636
- #0f0f0f
- #000000
From light to dark: 5 toward white and no darker step, since black is black already, mixed in OKLCH a sixth of the way at a time with the hue kept. A step that would repeat its neighbor is left out.
A palette around it
- #000000
- #d16a8a
- #ffd9e7
- #804655
- #5ddbbe
Around black as swatch 1, Recolor's generator made a complementary palette, built on the hue opposite: #d16a8a, #ffd9e7, #804655, #5ddbbe, drawn from a seed fixed by its hex. Open it in Recolor.
Using black
As a text color, black on a white page gives the same 21.00:1.
.notice {
background-color: black; /* #000000 */
color: white; /* 21.00:1 */
}Common questions
Does white text pass WCAG AA on black?
Yes. White text measures 21.00:1 on black, above the 4.5:1 that WCAG AA asks of body text, and above AAA's 7:1 too.
Can black be written in OKLCH?
Yes: oklch(0.0% 0.000 none), computed from #000000. A named color is an sRGB color, so its OKLCH value converts back to the same hex.
Is there a named color close to black?
No. The nearest, midnightblue (#191970), is 0.322 away in OKLab, a different color.