title: multiple transparent colors in animated gif with imagemagick?
body: <p>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.</p>
  <p>For example, here's the original image:</p>
  <p><a href="https://i.stack.imgur.com/XDrAw.gif" rel="nofollow noreferrer">animated gif 1</a></p>
  <p>and here's the result of my code.</p>
  <p><a href="https://i.stack.imgur.com/dv8Ty.gif" rel="nofollow noreferrer">converted animated gif</a></p>
  <p>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.</p>
  <p>Here's my script:</p>
  <pre><code>/usr/local/bin/convert 'https://radblast.wunderground.com/cgi-bin/radar/WUNIDS_map?num=40&amp;type=N0Q&amp;mapx=400&amp;mapy=240&amp;brand=wui&amp;delay=15&amp;frame=0&amp;scale=1&amp;transx=0&amp;transy=0&amp;severe=0&amp;smooth=0&amp;centerx=400&amp;centery=240&amp;station=GRK&amp;rainsnow=0&amp;lightning=0&amp;noclutter=0&amp;showlabels=1&amp;showstorms=0&amp;rand=27081615' -transparent '#87876F' -transparent '#6C6C58' -transparent '#1C3575' -transparent '#162A5D' ~/Desktop/radar.gif
  </code></pre>