extracted color option logic out of class