Just coming across this in 2020. I’m trying to replace the colors in several gradients, and this script would immensely speed up my process…however, I get this error when trying to use it:

I’ve never scripted before, but I assume I’m supposed to replace that “undefined” with something…could somebody please help me figure out what to replace it with to get this script running?