refactored into color class