gradient function

Create a matrix from vector to represent colors in gradient