Question about changing colors for the entire game

So i’m fairly new to programming and unity and might have bit off more than I can chew, but I was wondering if there would be a way to change all of one color in the game to a different color from a collectible or cutscene or some instance or event the player triggers. Like the PC flips a lever and everything in the game that is any shade of blue would be switched to yellow. My hope is that this would happen multiple times in the game with different colors so you have an entirely different view of the world by the end… I dont know if it helps but its a 2d topdown game.

There’s no “find yellow make blue” mechanism.

I suppose you could write one that works as a final 2D post processing shader, but I can’t imagine you would get very good results!

Another way would be to write something that exhaustively scans a scene for sprites, mesh vertices, textures, materials, etc and tries to see if they are yellow enough to become blue.

But both of those approaches are yucky in many ways.

The vastly superior approach is to identify the specific items that will change in advance, then as you make them, engineer them to support easy swapping out of a given color. If you already made them, go back and modify them to support color swapout.

And obviously, test on a small scale with a broad range of display mechanisms (sprites, meshes, etc.) to make sure you’re getting what you want before tearing everything up.