Working with PIL, made a gradient generator from several points and respective colors. Each point's color is the average of the color and distance from the set points