http://www.perlmonks.org?node_id=462281


in reply to changing the background of a Tk Label

I think I know what you want to do. You wish to reconfigure the color after the widget has been created. What you need is something like this:
$test->configure(-background => $bg_color).