Color replacer formula doesn't work [solved]

So, finally trying out beta 3

And one of my most used tools which didn’t work here is Morintari’s color replacer.
The formula is:
LMB:
if(a==bg,fg,a)
RMB:
if(b==fg,bg,b)

Hello cageburner the formula is
LMB
if(a==bg, fg, a)
RMB
if(a==fg, bg, a)
and you must be on indexed
I hope this helps

Thanks Morintari. but even with the formula you just shared, it still won’t work.
Neither this or the one i just posted.

In the demo below, the first filled rectangle shouldn’t have been drawn in the canvas if it was working normally.
The formula used here was the one Morintari has posted above. But either way, even if the formula used was the one in my original post, it still wouldn’t work how it should.

Nevermind. Looks like i had a perfect mix of oversight and forgetfulness.

  1. I forgot to turn on formula mode.
  2. Even if formula mode is on, it still wouldn’t work. When i turned off “Preserve Transparency”, it works!
  3. Both the formula along my original post and the formula posted by Morintari on his reply works.

Glad to hear it cageburner!

With V8 Beta 4 I added “Formula” paint mode to those then ignore “Preserve Transparency” because a formula must decide on its own what to do with transparent pixels. Anything else leads to confusion as we could see here.