Fixed nil issue in the index.html.erb equation for color putting logic in an if statement