The Gradient tool does a great job in drawing a simple colour gradient across layers (pixel layers, fill layers, adjustment layers, live filter layers, layer masks) as well as vector and text content. However, you might want to apply a more complex fill, introducing more than two colours along the gradient path, adjust where each colour is positioned and/or control colour transitions. You can do this in two ways.
Using the former, you modify the gradient by eye; the latter lets you design with precision and absolute control.
The following settings can be adjusted via tool's context toolbar (colour swatch):
With the Gradient tool selected, click the content with a gradient fill applied and then do any of the following: