Split shape color operations into an abstract class.