Generalize color property code.

Modifies color properties to use a generic declaration, shortening code.