did some DRY work for determining colors.