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

Color chooser

Enter an RGB value (each between 0 and 255) for the attributes below, and press "Try it!" to see the results.
[$foreach $color (@$colors) $] [$endforeach $]
[+ $headings[$col] +]
[+ $types->[$row] +] [+ $hex[$row] +]
Here is a link