[- ($types, $colors, $hex) = @param; @headings = ('Attribute', @$colors, 'Hex'); foreach my $type (@$types) { # Ustawiamy atrybuty wizualne strony. push @hex, $hex->{$type}; $attributes .= qq!$type=\\"#$hex->{$type}\\"!; foreach $color (@$colors) { # Tworzymy elementy tablicy do wyboru wartości RGB. next if $fdat{$type . $color}; @rgb = map{hex} unpack "a2a2a2", $hex->{$type}; foreach my $index (0 .. 2) { $fdat{$type . $colors->[$index]} = $rgb[$index]; } } } -]

Wybór kolorów

Proszę wprowadzić wartości RGB (między 0 i 255) dla atrybutów poniżej i nacisnąć "Wypróbuj!", aby zobaczyć rezultat.
[$foreach $color (@$colors) $] [$endforeach $]
[+ $headings[$col] +]
[+ $types->[$row] +] [+ $hex[$row] +]
Oto łącze.