That is clearly "doable," but it's not clear to me exactly what you want to do. Is it to find all Layers that have blue color assigned to them, and change their color to magenta? And only those Layers? That is, does "every layer" in your description refer not to every layer in the drawing, but to every layer with a particular color assigned?
If that's the intent, it can be done pretty simply without any code. Open the Layer Manager and pick on the Color heading at the top of the color indicator column, to sort the Layers by color. That will put all those that are blue together, making it easy to select them together and change their color collectively. But it could certainly be automated, if you really need that.
Kent Cooper, AIA