A gradient is the quickest way to set the mood of a photo. This guide covers the Gradient Fill layer end to end: how color stops and angle work, how a mask keeps the transition local, and which blending modes keep it looking natural. Open an image in Online PS and follow along.
-
Open your image
File → Open(or drag the file straight into the workspace). -
Duplicate the Background layer (
Ctrl + J)
You now have a "Background copy" layer, so the original image stays intact and you can delete or hide the copy at any time. -
Create a Gradient Fill layer (recommended)
Path:Layer → New Fill Layer → Gradient…(exactly the same in Online PS and Photoshop).
In the Gradient Editor that appears:- Pick a preset gradient, or click a color stop to add or change colors.
- Use Style (Linear, Radial, Angle, Diamond) and Angle/Scale to control the direction and shape of the gradient.
-
Adjust the blending mode and opacity (optional)
In the Blending Mode dropdown of the Layers panel, tryOverlay,Soft Light,Screenand so on. They let the gradient interact with the image underneath in a more natural, luminous way.
Use the Opacity slider to fine-tune the strength of the gradient; 30%–70% usually looks best. -
Add a layer mask (local control)
Select the Gradient Fill layer →Layer → Add Layer Mask(or click the mask icon at the bottom of the Layers panel).
The mask starts out white (fully visible). With the Brush tool (B):- Foreground color black → hides that area;
- Foreground color white → brings it back;
- Foreground color gray → semi-transparent transition.
-
Fine-tune further (optional)
- Edit the gradient: double-click the thumbnail of the Gradient Fill layer to reopen the Gradient Editor and change the colors, angle or style at any time.
- Rasterize, then Free Transform (if you need to distort the gradient shape non-linearly): right-click the Gradient Fill layer → Rasterize Layer, then use
Ctrl + T(Free Transform) orEdit → Transform → Warpto rotate, scale and distort the rasterized pixels. - Layer styles: click fx at the bottom of the Layers panel →
Color Overlay,Gradient Overlayto stack another color or gradient on top without touching the original gradient.
-
Save / export
Keep the layers:- Photoshop →
File → Save As → PSD(orFile → Save a Copy → PSD). - Online PS →
File → Export As → PSD; once downloaded, the file still opens for further editing in either app.
File → Export As → PNG(keeps the alpha channel) orFile → Export As → JPG(quality adjustable).- In the export dialog you can choose the color space (sRGB), resolution and compression quality.
- Photoshop →
Tip
Online PS and desktop Photoshop share almost identical shortcuts:Ctrl + J(duplicate layer),G(Gradient tool),B(Brush),Ctrl + T(Free Transform) and so on. The one exception is saving: in Online PS you have to use "Export As" to download the file.
Using a Gradient Fill layer instead of painting a gradient directly on a pixel layer is the best practice for keeping your edits flexible.
If you want the gradient to change only the local color without altering overall brightness, make a selection first (for exampleSelect → Color Range), then create the Gradient Fill layer inside it — that saves you the mask work.
References
- Adobe Photoshop official documentation
- HTML5 and the principles of modern front-end image processing
- Online PS