There are two Gradient Tools; Gradient and Classic Gradient.
Classic Gradient is the old tool that existed prior to 2023. I strongly recommend you use the newer, much better Gradient tool and that is covered below.
For a guide on using the older Classic Gradient Tool, please see Classic Gradient.
This tool was significantly improved in 2023 and now edits non-destructively, adding an Adjustment Layer to the image. It also gives a live preview as you create and adjust the gradient. This is a huge advantage over the old tool, Classic Gradient.
It's a big advantage, whenever you can, to edit non-destructively, because this gives you the flexibility to infinitely edit the Gradient in many ways.
For more details see Destructive vs Non-Destructive Editing.
The Gradient Tool works differently to all the other tools and has several uses. You can use it to create patterns using colors, or create a smoothly graduated effect, for example to darken a sky. You can also create a smooth graduation from visible to transparent (covered below).
Also see;
Creating a Radial Gradient
You can create and save a Tool Preset for any tool, which will remember settings that you choose for that tool, so you can quickly and easily select different presets and settings for a particular tool. The degree of usefulness of presets varies, depending on the tool.
You can reset any tool back to its default settings by right clicking on the Tool Presets button and select Reset Tool. Take care not to Reset All Tools, unless that is intended.
Gradient will apply a Gradient Adjustment Layer, with a Widget to edit the gradient. You also see a live preview as you create and edit the gradient.
The older Classic Gradient applies a Gradient directly to a layer, without a live preview.
There are many Gradient Presets you can use, in several colors.
The following options create Gradient Types,. Each is affected by where you start and end. The small thumbnail buttons give a visual guide as to what they do.
Linear Gradient creates a gradient in a straight line.
Radial Gradient creates a gradient in a circular shape.
Angular Gradient creates a gradient in a counter clockwis direction from the starting point.
Reflected Gradient creates a mirrored linear gradient, both sides of the starting point.
Diamond Gradient creates a gradient in a diamond pattern.
This reverses the gradient and is available in both modes.
When creating a smooth gradient, sometimes there is a visual banding, especially with 8bit images, which ruins the look. Dither smooths out the banding.
There are slight visual differences in each of the first 4 options. Try them each and see which you prefer. Perceptual and Linear are the newest, aiming to give more natural looking gradient, being closer to how the human eye sees them in the real world.
Stripes is designed for creating stripes, with multiple "stops" in the gradient.
Below are examples of each of the 5 Methods. Each example includes a Foreground to Background Gradient and a Foreground to Transparent Gradient, over a shorter distance.
We will now use the Gradient Tool (not the Classic Gradient tool). Steps 1-6 are exactly the same, but for your convenience, I repeat them here.
Select the Gradient Tool from the toolbar. Like most tools, it shares the button with other tools and the one that is visible will be the last tool used.
The two modes, Gradient and Classic Gradient, work in slightly different ways. This time, select Gradient.
Note that on the Options bar, these options have disappeared; Mode, Opacity and Transparency.
They are not needed as options, because you can control all of them in the Layers Panel. Unlike Classic Gradient, they are now editable, i.e. non-destructive, which is always a better way to edit, when possible.
Select the Gradient Type. The most commonly used type is the Linear Gradient (highlighted in red), which is what I will use here. It is selected by default, but if you have selected other gradients, the selected one will be the most recently used.
Select the Gradient Presets from the Options Bar (red box).
Expand the Basics section (orange box), to show the 3 options.
Foreground to Background (yellow box) This is shown here in the default Foreground and Background Colors, but you can change both to anything you like.
Foreground to Transparent (pink box) This creates a gradient that goes from the Foreground Color to transparent.
Black to White (green box) This creates a black to white gradient.
When a black and white gradient is used on a Layer Mask, the contents of the layer goes from hidden to visible. Layer Masks are black and white and shades of grey (black hides, white reveals).
I have selected the first of the Basic Gradients, Foreground to Background Colors.
I have changed the Foreground and Background Colors, to help with differentiating between this mode of using the tool and the Classic mode, as detailed in steps 1-13. Foreground and Background Color and Color Picker.
Click and drag. In the screenshot I am still in the process of dragging - I haven't yet finished the stroke. You get a real time preview of the gradient while you are dragging, wich is different from the Classic mode.
The same tip is applicable. If you want to draw a perfectly horizontal or vertical gradient, press and hold the Shift key. Note that gradients are created at 90 degress to the direction you click and drag.
Here I have completed the stroke.
Notice that, unlike in Classic mode, there is a line with 3 points, that is visible, for further editing.
In Classic mode the gradient has already been applied and there is no editing...apart from undoing, or trying another.
Unlike Classic mode Gradient Mode doesn't apply the gradient to the layer, but instead it adds a Gradient Adjustment Layer, above the selected layer. In this case, it's the Background Layer, but it will be added above the currently selected layer.
Also unlike Classic mode, this is non-destructive. Because all the editing is contained within the Adjustment Layer, the Background Layer remains unchanged - always an ideal way to edit.
Compare this to the next step.
This is the Layers Panel from the previous Steps 1-13, where Classic Gradient was used, which made direct changes to the layer, as can be seen in this screenshot. This is not an ideal way to edit, as it's destructive and not able to be fine tuned in the future.
The Gradient line that is visible can be edited very simply by clicking and dragging on either, or both, ends. Here I have moved the start point away from the left edge and also upwards.
Then I have dragged the end point to the left and downwards. Note how you see a real time preview of what the resulting Gradient will be.
I have moved both start and end points and changed the angle and also shortened the transition from one color to another.
If you double click on the Layer thumbnail of the Gradient Adjustment Layer (the picture in the layer), it opens the following panel, where you can change other options, in addition to the previous step.
As an example I have clicked and dragged the Angle to a different position - almost the opposite of what it was. Click on the line and drag to move it.
This is the result of the previous step to change the angle by dragging the dial.
Click on the line and drag to move the Gradient. By dragging to the right, the end point is now outside the canvas and there is not much blue showing.
You can click and drag on the slider in the midpoint and change the gradient. And again, you get a real time preview.
You can continue to edit the gradient.
You can also edit the Layer Mask of the Gradient Adjustment Layer. Here I have just done some very basic editing with the Brush tool, painting on the Layer Mask in black, which hides.
Here is the Layers panel showing the Gradient Adjustment Layer and the Layer Mask.
We will now use the Gradient Tool (as opposed to the Classic Gradient tool that I was using in all the preceding steps). Steps 1-6 are exactly the same, but for your convenience, I repeat them here.
We will now use the Gradient Tool (as opposed to the Classic Gradient Tool) to create a Foreground to Transparent Gradient.
Select the Gradient Tool from the toolbar. Like most tools, it shares the button with other tools and the one that is visible will be the last tool used.
Select Gradient (not Classic Gradient).
Select the Linear Gradient.
Change Foreground Color to your chosen color.
I have reset Foreground and Background colors back to their default of black and white. To do this just press the D key if you have a keyboard. Or clikc on the small black/white squares in the bottom left corner of the button.
If you want to reverse the colors, press the X key, or click on the double headed rounded arrow.
For more information see Foreground and Background Colors.
Click on the Gradient Presets button on the Options bar (highlighted in red).
Select the second Basics gradient, Foreground to Transparent.
Because I have set white as my Foreground Color, that is what is showing.
Click and drag to create your Gradient. This will add a Gradient Adjustment Layer and is fully editable.
You can adjust the start and end point positions, change the angle and change the color.
This is how the Gradient looks with the background layer hidden, as shown in the Layers panel in the next step.
This is the Layers panel for the previous step, showing the background layer is hidden (eye icon turned off), so you can only see the Gradient Adjustment Layer.
You can add multiple Gradient Adjustment Layers.
To add an additional Gradient Adjustment Layer, you must click away from the current Gradient Layer. If you don't click away you will be repositioning the Gradient.
Here is the result of adding 4 Gradient Adjustment Layers.
The Gradient Tool can be used in two ways. Classic Gradient creates a gradient directly on the layer pixels and is therefore destructive. If this is not specifially your aim, then I recommend using the Gradient tool, which creates an Adjustment Layer, that can be edited and many options changed. Adjustment Layers are non-destructive and give you much greater flexibility to edit your image.
For more details see Destructive vs Non-Destructive Editing.