Darko Stanimirovic provides these two examples that draw color gradients.
The idea is to draw lines or circles spaced 1 pixel apart with slightly different colors.

In the following code, BeginColor represents the red, green, and blue components of the gradient's
starting color. Rlevel, Glevel, and Blevel are the differences between the starting and ending red, green,
and blue components divided by the width of the form in pixels. Thus, for example,
BeginColor.r + i * Rlevel gives the red component value for the ith pixel.