I'm guessing you'd do something like this:
registerOutputEvent(Player, doColorChange, "paintColor 0" TAB "paintColor 0" TAB "paintColor 0", 1)
function Player::doColorChange(%player,%color0,%color1,%color2,%client)
{
//Stuff
}
EDIT: Fixed the name of the function.