repair php color choosing method