CSS named color

Black #000000

black rgb(0, 0, 0)

Black is a black with the hex code #000000, which converts to rgb(0, 0, 0). Open #000000 in the converter to tweak it.

Black color values

HEX#000000
HEX (shorthand)#000
RGBrgb(0, 0, 0)
RGBArgba(0, 0, 0, 1)
8-digit HEX#000000FF
HSLhsl(0, 0%, 0%)
HSV / HSB0°, 0%, 0%
CMYK0%, 0%, 0%, 100%
RGB 0–10, 0, 0
Decimal0
CSS keywordblack

How #000000 converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: 00 → 0, 00 → 0, 00 → 0. That gives rgb(0, 0, 0). The step-by-step guide explains the math.

Shades of Black

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of Black

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of Black on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.

Black has no hue (saturation is 0%), so hue-based harmonies collapse to the same gray. Grays pair with any accent color — pick one from the palette generator.

Contrast and accessibility

TextBackgroundRatioWCAG 2.x
White Black 21.00:1AAA
Black Black 1.00:1Fail

Use white text on a black background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use Black in CSS

.element {
  color: black;                         /* keyword */
  background-color: #000000;            /* hex */
  border-color: rgb(0 0 0 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #00000080 is Black at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for Black?

The CSS named color black is #000000 in hexadecimal. In CSS you can write color: black; or color: #000000; — both produce the same pixel.

What is Black in RGB?

Black is rgb(0, 0, 0): red 0, green 0, blue 0 on the 0–255 scale. As normalized 0–1 floats that is (0, 0, 0).

Is white or black text more readable on Black?

White text is more readable. White on #000000 has a contrast ratio of 21.00:1 (AAA), black on #000000 has 1.00:1 (Fail). WCAG AA needs 4.5:1 for normal text.

Copied!