Help for this page

Select Code to Download


  1. or download this
    my %color = ( lavender => $im->colorAllocate(230,230,255),
                   lightblue => $im->colorAllocate(173,216,230),
    ...
    while (@ary) {
             my $genecolor= coloring ();
             $im->filledRectangle($X1,$Y1-20,$X2,$Y2,$color{$genecolor});
    
  2. or download this
     sub coloring{
      my @color= @{$_[0]};
      my $color_no=int(rand(scalar @color));
      return $color[$color_no];
    }
    
  3. or download this
    my %color = ( lavender => $im->colorAllocate(230,230,255),
                   lightblue => $im->colorAllocate(173,216,230),
    ...
             my $genecolor= coloring ([keys %color]);
             $im->filledRectangle($X1,$Y1-20,$X2,$Y2,$color{$genecolor});
    }