Get gradient ramp. The ramp argument should be an array of size nramp, which will be filled with the appropriate color values.