Stuck on random color issue calling it in ng-repeat causing infinite loop