Formatting the gradient as a string of values