refactored Color a little. professor's solution is still shorter.