Added functionality to the button to the save gradient