Looking for a way to make multiple (In this case 4, but in the future arbitrary) colors in an animated gif transparent with imagemagick. I know I can use multiple -transparent commands, but when the animated gif is composed, it results in some bizarre compositing, with previous frames remaining rendered instead of clearing the canvas. This doesn't happen if just one color is made transparent.
For example, here's the original image:
and here's the result of my code.
The 4 background colors were successfully made transparent, but now the animated portions that were directly contacting the transparent areas aren't cleared after every frame.
Here's my script:
/usr/local/bin/convert 'https://radblast.wunderground.com/cgi-bin/radar/WUNIDS_map?num=40&type=N0Q&mapx=400&mapy=240&brand=wui&delay=15&frame=0&scale=1&transx=0&transy=0&severe=0&smooth=0¢erx=400¢ery=240&station=GRK&rainsnow=0&lightning=0&noclutter=0&showlabels=1&showstorms=0&rand=27081615' -transparent '#87876F' -transparent '#6C6C58' -transparent '#1C3575' -transparent '#162A5D' ~/Desktop/radar.gif