Filter to remove an colour only on external region of picture

Hello. I have an window capture that sometimes give an small problem but maybe there is some filter to solve.
Leave at example my picture on atachment. The rectangle has number one and the external region of rectangle has number 2. Keep in mind that region 1 changes on size and colour all time. There is an way to remove the yellow(because my example is yellow i want to know for any colour) only on region 2, the external region.
 

Attachments

  • Untitled.png
    Untitled.png
    7.6 KB · Views: 11
Back
Top