Filling a Shape with a Color Gradient

You can fill a shape with a gradually changing color by using a gradient brush. Windows GDI+ provides linear gradient brushes and path gradient brushes. The following illustration shows a rectangle filled with a linear gradient brush and an ellipse filled with a path gradient brush.

illustration showing a rectangle that filled from top left to lower right, and an ellipse that fills from center to edge

For more information about gradient brushes, see Filling Shapes With a Gradient Brush.