Hi Rom. I don't know the answer but I'm pretty sure that a java script exists for something like this..
If someone replies here, it will be great for you and for the rest, but if you don't find a solution you can always do it in another way, not so 'professional' but with a similar function. You can create a number of layers or images (better) that they have a different transparency and then with right click selections, you can make them selectable hidding the other ones.
Just an idea...

Example
https://jimking.deviantart.com/art/Weat ... -655218106
_________________
...and remember: don't take life too seriously...My profile on Deviantart:
http://jimking.deviantart.com/