rendered paste body if [ "$color"=="$maincolor1" ]
then
convert -fill "$background" "$workimage" -opaque "$maincolor2" "$imagenoext$i.pnm"
cp "$imagenoext$i.pnm" "$workimage"
convert -fill "$background" "$workimage" -opaque "$maincolor3" "$imagenoext$i.pnm"
echo "1"
elif [ "$color"=="$maincolor2" ]
then
convert -fill "$background" "$workimage" -opaque "$maincolor1" "$imagenoext$i.pnm"
cp "$imagenoext$i.pnm" "$workimage"
convert -fill "$background" "$workimage" -opaque "$maincolor3" "$imagenoext$i.pnm"
echo "2"
elif [ "$color"=="$maincolor3" ]
then
convert -fill "$background" "$workimage" -opaque "$maincolor1" "$imagenoext$i.pnm"
cp "$imagenoext$i.pnm" "$workimage"
convert -fill "$background" "$workimage" -opaque "$maincolor2" "$imagenoext$i.pnm"
echo "3"
fi