Gradient Tool

The Gradient tool is used to create color transitions between a set of color points or stops. To apply a gradient to the image press and drag with the left mouse button to draw the gradient line. Releasing the mouse creates the gradient.

By default the gradient tool creates color transitions between the foreground and background color in the color selector. Custom gradients can be created by clicking the gradient preview to open the gradient dialog. In the dialog you can edit the color stops and you can select from preset gradients.
Related Links:
HTML5 canvas linear gradient
Radial gradient