use strict; use warnings; use Tk; use Tk(qw/NORMAL_BG/); use feature 'say'; my $mw = Tk::MainWindow->new; my $bt = $mw->Button(-bg => 'green', -text => 'green')->pack(-fill => 'x'); say 'background ', $bt->cget(-bg); my $col = NORMAL_BG; say "default background $col"; $mw->Button(-bg => $col, -text => $col)->pack(-fill => 'x'); $mw->Button(-text => 'default')->pack(-fill => 'x'); MainLoop;