Page 1 of 1

Make all colors transparent except for specific colors

Posted: 2017-08-08T01:01:09-07:00
by 923882
Hello I'm trying to overlay a rain radar image onto a google map this is the image: http://imgur.com/a/Z2bLT
I'm trying to remove all of the colors that are not the colors that indicate rain. What I've previously being doing is finding the RGB values that don't indicate rain and using ImageMagick to make them transparent but there is hundreds of them which is annoying.

This is a list of RGB values that I want to keep and make every other RGB value transparent:

147,151,0
182,185,0
218,225,46
252,253,119
252,251,0
253,240,2
253,236,0
253,221,0
251,201,0
255,191,0
253,177,0
252,158,0
46,76,189
60,102,219
81,128,255
94,175,255
119,234,243
102,208,215
85,183,185
76,169,166
223,56,0
241,58,0
253,72,1
107,31,154
188,71,222
233,230,233
255,255,255
74,175,0
123,249,0
206,54,145
231,68,199
253,82,255

Re: Make all colors transparent except for specific colors

Posted: 2017-08-08T05:34:21-07:00
by snibgo
You can make just those colours transparent, with "-transparent rgb(147,151,0)" etc. Then negate the alpha channel.

Re: Make all colors transparent except for specific colors

Posted: 2017-08-10T09:27:02-07:00
by 923882
snibgo wrote: 2017-08-08T05:34:21-07:00 You can make just those colours transparent, with "-transparent rgb(147,151,0)" etc. Then negate the alpha channel.
Thank you :)