How do I change the color of my character as it goes through a wall?

I have a spefific idea for this, so hear me out:
I have a contrast black and white thing going on, and I want to make the character white on black background and black on white background. When the colors change, however, The character should change to the opposite color as it goes through the wall. Is there any scripting solutions? thanks.

By the way, this is what I’m trying to accomplish:

You can use this shader to invert color, but it works as a filter. if you just want to change the color of just the character, maybe you can use projector. But i think it will be more flexible if you know how to do scripting. People usually have to write their own shader to achieve their unique art style