for my $i (@$grad) { push @rows, Tr(td({-bgcolor=>$i}, $i)); } #### for my $i (@$grad) { push @rows, Tr(td({-bgcolor=>"#$i"}, $i)); }