convert -size 1000x1000 xc:"rgba(0,0,0,0)" `
-fill green -draw "rectangle 200,200 400,400" `
-fill red -draw "rectangle 300,300 500,500" `
-fill blue -draw "rectangle 400,400 600,600" `
-fill yellow -draw "rectangle 500,500 700,700" `
-fill cyan -draw "rectangle 600,600 800,800" `
-fill magenta -draw "rectangle 700,700 900,900" `
tp.png
You don't say what version of IM nor what platform. Line feeds are not `, but \ on unix and ^ on Windows
This works perfectly fine for me on IM 6.7.0.2 Q16 Mac OSX Tiger
convert -size 1000x1000 xc:"rgba(0,0,0,0)" \
-fill green -draw "rectangle 200,200 400,400" \
-fill red -draw "rectangle 300,300 500,500" \
-fill blue -draw "rectangle 400,400 600,600" \
-fill yellow -draw "rectangle 500,500 700,700" \
-fill cyan -draw "rectangle 600,600 800,800" \
-fill magenta -draw "rectangle 700,700 900,900" \
tp.png
convert tp.png tp.gif
Both images have the same colors.