In this article, you will know how to add a colorful, realistic rainbow to an image with Photoshop. To create the rainbow, we will use one of Photoshop’s built in rainbow gradients. You will know where to find the gradient and how to load it into Photoshop.

You will learn the fastest way to add the rainbow gradient to your image, and the easiest way to position the rainbow exactly where you need it. We will blur the colors so they blend together more smoothly and we will hide the rainbow from different areas using a layer mask. And then finally, we will finish off the tutorial by learning an advanced yet easy way to blend the rainbow in with the clouds.

Add a Rainbow to an Image

To follow along, you will want to be using Photoshop CC 2020 or later version.

Let’s start | Add a Rainbow to an Image

Step 1: Open your image

Open your image

Start with opening your image into Photoshop. Select any of your favourite image from your collection.

Step 2: Open the Gradients panel

Open the Gradients panel

Open the Gradients panel which is new as of Photoshop CC 2020. The gradients panel is found in the same panel group as the color, swatches and Patterns panels.

Step 3: Load the Legacy Gradients

To create the rainbow, you need to use one of Photoshop’s built in rainbow gradients.

Load the Legacy Gradients

But as of Photoshop CC 2020, many of Photoshop’s older gradients, including the one you need, have been moved into a new Legacy Gradients group. And before you can use the group, first you need to load it into Photoshop. If you have already loaded the Legacy Gradients, you can easily skip to Step 4.

Load the Legacy Gradients

Step 4: Select the – Russell’s Rainbow gradient

Scroll down to the bottom of the Gradients panel and twirl open the legacy gradients group by clicking the arrow to the left of the folder icon.

Russell's Rainbow gradient

Then inside the group, scroll down to the Special Effects group. Twirl the group open and select the Russell’s Rainbow gradient by clicking on its thumbnail.

Special Effects

Step 5: Drag the gradient onto the image

Drag the gradient’s thumbnail from the Gradients panel and drop it onto your image.

Drag the gradient onto the image

Then you will see the rainbow gradient appears horizontally across the top:

rainbow gradient

Step 6: Open the Gradient Fill dialog box

In the Layers panel, the gradient appears as a Gradient fill layer above the image.

Open the Gradient Fill dialog box

To edit the shape of the gradient, double click on the fill layer’s color swatch. This opens the Gradient Fill dialog box.

Gradient Fill dialog box

Step 7: Change the gradient style to Radial

Change the gradient style to Radial

In the dialog box, change the Style of the gradient from Linear the default setting to Radial. This gives the rainbow the circular shape we need.

Step 8: Scale the size of the gradient

Click inside the scale box to highlight the current value, to change the size of the rainbow. The default value is 100%.

Scale the size of the gradient

Use the up or down arrow keys on your keyboard to increase or decrease the value. Hold Shift key while pressing the arrow keys to adjust the value in larger steps. The exact size you need will depend on your image and how large the rainbow should appear. You can increase the Scale value to 143%.

Scale the size of the gradient

At this value, the left and right sides of the rainbow are extending almost to the edges of the image. The top of the rainbow now extends beyond the image, but you need to fix that next.

Step 9: Move the rainbow into place

With the gradient Fill dialog box still open, click on the image and drag the rainbow into position. To make it easier to move the gradient straight up or down, hold Shift key as you drag. You may need to go back and forth between moving the gradient and adjusting the Scale value until you get things right. When you’re done, just click OK to close the Gradient Fill dialog box.

Move the rainbow into place

Step 10: Convert the Gradient fill layer into a smart object

This time to give the rainbow look more realistic by applying a blur to the gradient. But Photoshop won’t let us apply the blur directly to a Gradient fill layer. So first, we will convert the fill layer into a smart object. In the layers panel, make sure the Gradient fill layer is selected. Now click the menu icon in the upper right of the panel.

Convert the Gradient fill layer into a smart object

And choose Convert to Smart Object from the menu.

And choose Convert to Smart Object from the menu.

A smart object icon appears in the lower right of the layer’s preview thumbnail, telling us that the layer is now a smart object.

telling us that the layer is now a smart object

Step 11: Change the gradient’s blend mode to Screen

Change the gradient's blend mode to Screen

Before applying the blur, change the blend mode of the smart object from Normal to Screen. The Screen blend mode brightens the gradient and blends the colors in with the image.

Step 12: Apply the Gaussian Blur filter

Apply the Gaussian Blur filter

zo to the Filter menu in the Menu Bar at the top of the screen, choose Blur, and then choose Gaussian Blur. Then in the Gaussian Blur dialog box, drag the radius slider to the right to blur the gradient and soften the transitions between the colors. The exact Radius value you need will depend on the size of your image, so keep an eye on your image as you drag the slider to find the value that works best. For a fairly large, choose a Radius value of around 100px. Then click OK to close the dialog box, and here’s my result with the blur applied.

How to change the Gaussian Blur amount

Since we used the Gaussian Blur filter with a smart object, Photoshop applied it as a smart filter, that means that the filter settings remain editable. You can re-open the Gaussian Blur dialog box and adjust the Radius value by double-clicking on the words Gaussian Blur below the smart object in the Layers panel at any time.

How to change the Gaussian Blur amount

Step 13: Add a layer mask

An obvious problem with the rainbow is that it is still a complete circle. We need to hide the bottom half of the gradient, and you can do that using a layer mask. In the Layers panel, just click the Add Layer Mask icon. Then a layer mask thumbnail appears on the gradient smart object.

Step 14: Select the Gradient Tool

Select the Gradient Tool from Photoshop’s toolbar.

 Select the Gradient Tool

Step 15: Choose the Black, White gradient

Then in the options Bar, click the arrow next to the gradient color swatch.

And in the Gradient picker, twirl open the basics folder and choose the black, white gradient by double clicking on its thumbnail. This will select the gradient and close the Gradient picker.

Step 16: Draw a black to white gradient on the layer mask

In the layers panel, make sure the layer mask is selected. You should see a highlight border around its thumbnail.

Draw a black to white gradient on the layer mask

In your image, click anywhere along the horizon line to set the starting point for your rainbow. If there is no exact horizon line, click where the left and right sides of the rainbow should begin to appear. Everything below this point is where the rainbow will be hidden. Keep your mouse button down, hold the Shift key on your keyboard, and drag straight up to just below the top part of the rainbow. The Shift key makes it easier to drag vertically.

 drag vertically

Now release your mouse button and the bottom of the rainbow disappears, leaving only the top half that gradually fades into view as it rises into the sky. If you did not draw the black to white gradient exactly right, draw it again. The new gradient will replace the previous one.

Step 17: Select the Brush Tool

Once you have hidden the bottom of the rainbow, there may be other, smaller areas you need to hide. To hide areas like this, select the Brush Tool from the toolbar.

Select the Brush Tool

Step 18: Choose the Soft Round brush

With the Brush Tool selected, right-click for Windows  for users  / Control-click  for Mac users anywhere inside the image. Then in the Brush Preset picker, choose the Soft Round brush from inside the General Brushes folder. This will give us a brush with soft edges, allowing us to paint a smooth transition.

Choose the Soft Round brush

Step 19: Paint with black to hide more areas of the rainbow

Make sure your foreground color is set to black. The current foreground and background colors are found in the color swatches near the bottom of the toolbar.

 Paint with black to hide more areas of the rainbow

If the Foreground color upper left is white and the Background color lower right is black, press the letter X on your keyboard to swap them.

Before you start painting, change your brush size using the left and right bracket keys ( [ and ] ) on your keyboard. The right bracket key makes the brush larger while the left bracket key makes it smaller. The larger the brush, the wider the transition area you will create. Simply paint over the part of the rainbow you want to hide. Or you may find that just clicking on the area a few times works better. If you make a mistake, press Ctrl+Z for Windows users / Command+Z for Mac users on your keyboard to undo your brush stroke and try again. And this is the time for the result.

 Paint with black to hide more areas of the rainbow

Step 20: Open the Blending Options

At this step, the main rainbow effect is complete. But we can take it a step further by blending the rainbow into the clouds. And for that, you will use Photoshop’s Blending Options. In the Layers panel, click the Add Layer Style icon and the “fx” icon.

Choose Blending Options from the menu.

Open the Blending Options

Step 21: Drag the black Underlying Layer slider to the right

In the Layer Style dialog box, you will find two sets of sliders at the bottom, each with its own black to white gradient bar. The top set is labeled this layer and the bottom set is labeled “underlying layer”. Click on the black slider for the Underlying Layer set and begin dragging it to the right.

Drag the black Underlying Layer slider to the right

Keep an eye on your image as you drag and stop when the darkest clouds from the image begin to show through the rainbow. The problem is that the transition between the clouds and the rainbow is very harsh. So to fix that, press and hold the Alt for Windows users / Option for Mac users  key on your keyboard and drag the black slider apart into two halves. The space between each half creates a transition area between the clouds and the rainbow. Adjust each half of the slider until the result looks more realistic. When you are done, click OK to close the Layer Style dialog box. And here is my final rainbow effect with the clouds and the rainbow blended together.

Drag the black Underlying Layer slider to the right

And there you will get your desired result.