sub pick_n_mix { my ($btn) = @_; my $old = $btn->cget( -bg ); my $col = $mw->chooseColor( -title => "Choose a nice colour...", -initialcolor => $old ); return unless $col; # Choose a contrasting colour for text... my $fg = contrast_colour($col); $btn->configure( -bg => $col, -activebackground => $col, -fg => $fg, -activeforeground => $fg ); }