How to change GRADIENT with code?

I’m basically trying to swap the button designs. The issue is that the selected button has a gradient, so I am not sure how to change gradient with Velo.