... if ($colour) { $colour_button->configure( -background => $colour, -activebackground => $colour ); } ...