BGCOLOR — Display or change the desktop background color.

Syntax:
BGCOLOR /S color

/Ssave color to the registry
colorthe name or RGB value of the color to set

You may specify the color as a single RGB value in either hexadecimal (e.g. #8B4513) or decimal (9127187); as three separate values for red, green, and blue, in that order (0x8b 0x45 0x13 or 139 69 19); or as a W3C color name (SaddleBrown).

If you specify the color in hexadecimal with a leading # sign, it must be either three or six hex digits long. If it’s three digits long, each digit is doubled; #8ac is the same as #88aacc. Alternatively, you can use a leading 0x and the rules above do not apply; the number of digits is not significant.

The color change only affects the current session and will be lost at logout, unless /S is specified. Note that /S must be typed before any color name.

rem  Set the background color to dark slate gray:
bgcolor darkslategray


See also: the _BGCOLOR variable, which which reports the current background color as a hexadecimal value; the _BGCOLORNAME variable, which reports it as a W3C color name if possible; the @IMGCOLOR function, which returns the color of a pixel in a graphics file; and the @RGBCOMPL function, which returns a complementary color.