Debug what? The selected colour is assigned to the "color" variable of yours.