< index
< 2. Console emulator
< 2.2 Drawing on the root console

=====================================
Setting the default background color
=====================================

C++ : void TCODConsole::setBackgroundColor(TCODColor back)
C   : void TCOD_console_set_background_color(TCOD_console_t con,TCOD_color_t back)
Py  : console_set_background_color(con,back)

This function changes the default background color for a console. The default background color is used by several drawing functions like clear, putChar, ...
To change the default background color of the root console, use

C++ : TCODConsole::root->setBackgroundColor(myColor)
C   : TCOD_console_set_background_color(NULL, my_color)
Py  : litbcod.console_set_background_color(0, my_color)

ParameterDescription
conIn the C version, the offscreen console handler or NULL for the root console.
backThe new default background color for this console.
insert a comment