Changing/Adding color to tilesets

So I have this idea where the game would start off black and white and you would unlock colors as you go along. I realize you can use a filter and then you could change it to show more color/ different colors but, how would go about unlocking a single color/ color range at a time. Like Black and white > Black, white, and Blue, etc.

The only way I could think to do this would be to just create X number of different versions of the tile sets and then switch the former tile set out for the new one. But I don't think it's possible to create an event to switch out the tile sets. (I would need an event so that when the character performs an action the color is "released") Unless I'm overlooking an obvious solution here?

-Thanks in advance.

Edit: I had the idea to do the multiple tile sets thing, and to just recreate each map with each tile set, and once you unlock a color you would be transported to a the new tileset world. But I feel I would not only be in danger of hitting the 999 limit, but it would take suuuuuper long to do, and if I changed one map I would have to change 6 others or whatever the number happens to be.
Multiple tilesets, then a parallel process event on each map (with Erase Event at the end) or a common event that would be called as each map is loaded (I wrote a script to do that), that would check the various switches and run the Change Tileset command according to what point you're up to in the game.

It would make it even easier if you use some kind of naming scheme for your tilesets - give each version for each area the same prefix, and make the suffix indicate the colours available or the point in the game where it becomes active or something like that. That way, you'd be able to do a single script call to replace the tileset regardless of what map you're on, rather than needing lots of conditional branches to check the map/tileset/point in game.
That's a good idea, this is what I think I'm going to do:
Set a switch to on when you press on the object that unlocks the color. Have an event in each map with a conditional branch when switch is on switch to this tile set. All I would have to do is make the new tile sets. Does this look right?:
Almost, but if switch 1 and 2 are both on, in your event, you're going to change the tileset twice. This consumes CPU. Imagine you had a dozen colours, so a dozen switches, and a dozen tileset changes each time you enter a map. This means all 12 tilesets have to have all their images loaded.

Try it like this instead:
Code:
If Switch 12 is ON
  Change Tileset: 12 Colours
Else
  If Switch 11 is ON
    Change Tileset: 11 Colours
  Else
    If switch 10 is ON
      Change Tileset: 10 Colours
    Else
      ... and so on, through all of your switches
    End
  End
End

So it only changes to the tileset that's correct for the current point in the game, and once it finds the correct tileset, it stops checking all the others.

Also, make sure you put Erase Event at the end. I did say that above, and you seem to have missed it, as most people do. That is VERY important, or your game is going to end up lagging like crazy if you have a number of parallel process events that are running when they don't need to be running.
Awesome, I'll make sure to remember the Erase Event at the end. Thanks for all your help!

Original thread: https://forums.rpgmakerweb.com/threads/changing-adding-color-to-tilesets.95696/