Added new function to graphics module: gradient for generating gradients