Refactored voting code for colors.