Globally change colour of pixels of specific colour in 2D?

I’m making a 2D game, lots of sprites, lots of tiles etc, and what I’m hoping to do is change a specific colour of everything displayed on screen to another colour.

Example: I would like to change all red pixels to green.

Can someone point me in the right direction please?

Thanks.

Thank you.

Two options:

  • Use Unity’s “post processing” with a so called “color LUT”. You can activate/deactivate those effects then.
  • Use a custom “screenspace shader” that simply replaces the color (or does fancier things like smooth transition). See here for that kind of shaders: Unity - Scripting API: MonoBehaviour.OnPostRender() (note that this script gotta be on game obejct of the camera). AI can write such a shader for you but you should know the basics.