% my ($types, $colors, $hex) = @_; my @headings = ('Attribute', @$colors, 'Hex'); my ($attributes, %values); foreach my $type (@$types) { # Set up the body attributes. $attributes .= qq!$type="#$hex->{$type}" !; # Create the RGB chooser table elements. my @rgb = map{hex} unpack "a2a2a2", $hex->{$type}; foreach my $index (0 .. 2) { $values{$type . $colors->[$index]} = $rgb[$index]; } } %>
>