Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm making some graphics wherein I want to loop through the RedGreenBlue color-components. Sometimes I can simply write something like:

$x = 20; $white=$img->colorAllocate(255,$x*2,255); $img->line(0,0,50,50,$white); $white = $img->colorAllocate(255,$x*10,150); $img->line(50,50,150,250,$white);

And then it works. Sometimes this doesn't work so i try to deallocate f.e.:

$blue = $img->colorAllocate(0,0,25); $img->colorDeallocate($blue); $blue = $img->colorAllocate(0,0,25*$teller);

But this doesn't work either. Can someone tell me how to do this? Thank you.