Technically that will just make Sonic flash white Flame.
For turning the player white you're actually in luck, if you make a thing that repeatidly uses A_CustomPower to give the player pw_fireflower, it'll turn them white.
Although it'll also give them the power to throw fireballs in Mario mode.