Help for this page

Select Code to Download


  1. or download this
    sub random_color {
        my ($r, $g, $b) = (int(rand(256)), int(rand(256)), int(rand(256)))
    +;
    ...
        my $color2 = sprintf("#%02x%02x%02x", ($r + 128) % 256, ($g + 128)
    + % 256, ($b + 128) % 256);
        return ($color1, $color2);
    }
    
  2. or download this
                    my ($c1, $c2) = random_color();
                    $msg .= $cgi->table({-border => 1, bgcolor => $c1, sty
    +le => "Color: $c2;"}, $cgi->Tr($table_data));