refactoring and creat metho to generate random layout colors when click the button