< index < 2. Console < 2.2 Drawing on the root console | ===================================== Changing the colors associated with a color control code ===================================== |

    C++ : static void TCODConsole::setColorControl(TCOD_colctrl_t con, const TCODColor &fore, const TCODColor &back)
    C   : void TCOD_console_set_color_control(TCOD_colctrl_t con, TCOD_color_t fore, TCOD_color_t back)
    Py  : console_set_color_control(con, fore, back)

This function associates a background and a foreground color with a color control code.
There are 5 color control codes you can use. The color control code may be :

    	TCOD_COLCTRL_1
    	TCOD_COLCTRL_2
    	TCOD_COLCTRL_3
    	TCOD_COLCTRL_4
    	TCOD_COLCTRL_5

For python, remove TCOD _ : libtcod.COLCTRL_1

Parameter | Description
--- | ---
con | The color control code.
fore | The foreground color associated with this color control code. You can use color constants.
back | The background color associated with this color control code. You can use color constants.

Example :

    C++ : TCODConsole::setColorControl(TCOD_COLCTRL_1,TCODColor::red,TCODColor::black);
          TCODConsole::root->printLeft(1,1,TCOD_BKGND_SET, "String with a %cred%c word.",TCOD_COLCTRL_1,TCOD_COLCTRL_STOP);
    C   : TCOD_console_set_color_control(TCOD_COLCTRL_1,red,black);
          TCOD_console_print_left(NULL,1,1,TCOD_BKGND_SET, "String with a %cred%c word.",TCOD_COLCTRL_1,TCOD_COLCTRL_STOP);
    Py  : libtcod.console_set_color_control(libtcod.COLCTRL_1,libtcod.red,libtcod.black)
          libtcod.console_print_left(0,1,1,libtcod.BKGND_SET, "String with a %cred%c word."%(libtcod.COLCTRL_1,libtcod.COLCTRL_STOP))