Is there any way to "calculate" more or less which values you need to remove a certain color filter or is it just trying a thousand times until you get it?
For tonemap defog I use RGB Color values like this:
www.madsci.org/posts/archives/2001-08/999275799.Ph.r.html
or this:
www.rapidtables.com/web/color/RGB_Color.htm
so the values of defog all go up to 2.55 and RGB color values like this go to 255 so I just translate.
Start out with a low amount of defog and work your way up until the image is neutral.
Hopefully this helps you out.
P.S: This is a cross-post from the ReShade forums :)