starting logic to determine background color