Now that I see your solution, I had a good guess of how to solve my problem, but I was missing the .colors in cgrad()
.colors
cgrad()