Very cool idea. I like that enemies switch from neutral to damaging (I got burned once or twice haha).
It might be cool to add some logic based on the bullet color as well. Eg. the player changes colors which changes which enemies can hurt you, but ALSO the bullets change colors independently from the player. So there are times when you are on pure offense, pure defense, and both at the same time, depending on said colors.
Just an idea! I really enjoyed it.
Thanks!