implement onColorChange and quantites as CP