for plugins and presets > tutorials > Patterns

How to Use Rectangle Shapes for Backgrounds in Photoshop Tutorial

red lines how to use rectangle shapes for backgrounds

How to create a rectangle themed pattern in Photoshop tutorial using lines and random fill script. The key thing is to set up a rectangle in the first place. The rectangle shape for the background can be long or thin or wide. The rectangle line can have any color fill such as gradients or a solid color. It can have effects added to the rectangle line shape by using layer style. Delete the background layer via the layers panel. The Photoshop rectangle line is selected by using the rectangular marquee tool. Define the rectangle shape via the edit menu define pattern command. To create a random filled background using the created line pattern, go to the edit menu and fill and select the pattern option and the rectangle shape and check the script checkbox. Go to the next panel in the fill and set the density and color randomness etc. Adjustments can then be used on the rectangle shape filled background such as Photoshop adjustment 'vibrance' etc. This tutorial shows how to take a humble rectangle shape and create a vast range of different colorful random filled background in Photoshop

  1. select rectangle tool in toolbar

  2. set to shape layer option and select color

  3. goto the layers panel and delete background layer

  4. select the rectangle shape using rectangular marquee

  5. edit menu and define pattern command

  6. deselect and flatten image

  7. edit menu and fill

  8. pattern option and script (random fill) and select the rectangle shape pattern & OK

  9. Set density, color, brightness etc & OK

Rectangle shape as source

source rectangle source for Photoshop

All kinds of rectangles can be created using the rectangle tool in Photoshop such as thin ones, squares, wide rectangles and many others.


You can use the rectangle tool (press U on the keyboard) once or multiple times to create all kinds of unique rectangular designs. To use those shapes as a source for a pattern and in particular one for the random fill script, it is best to add the rectangle (rectangles) onto a layer (or layers).


You can use them with a single color or gradient or a pattern as well, along with a stroke.


You can also combine that layer with a layer effect such as a shadow or you can convert it into a smart object and combine with effects such as paint daubs and blurs.


The key thing though for the random fill or pattern scripts in Photoshop is to remove the background so just go to the layer panel and delete the background leaving only the rectangles as this means the random fill will not be filled with a white background (if white).


  1. Select the rectangle tool found in the toolbar

  2. set to shape layer

  3. Create a long vertical rectangle

  4. set color such as to a gradient or solid color

  5. layer menu

  6. layer style

  7. add drop shadow etc




Define the rectangle shape pattern

define pattern command
  1. Select the rectangle tool

  2. set the shape option to shape layer

  3. Set the color etc

  4. Add effects such as shadows etc

  5. Go to the layers panel

  6. Delete the background layer by clicking the trash can at the bottom of the layer panel

  7. Edit menu

  8. Define pattern command

  9. flatten document and deselect any selection


Of course, there are many other variations that can be used such as adding different effects or perhaps adding multiple rectangle lines and different colors and different angles and sizes

Random fill / script and rectangular patterns

  1. Go to the edit menu

  2. fill command

  3. select the pattern option

  4. select the script checkbox

  5. set the dropdown to random fill (or any of the others)

  6. select the correct rectangular shape tile

  7. select the random fill option

  8. Click OK.

  9. A dialog will appear allowing you to modify the density as well as scale and rotation and color and brightness etc. Depending on the size of the document / tile, the preview will loosely represent the end result (not really sure if the preview is actually showing a part of the result or it is just occasionally inaccurate).


Anyway, you will see a jumble of lines filling the preview and you can increase or remove lines by changing the density. You can always apply the fill and then add a new layer and then add another random fill to totally fill the image.


You can also then use multiple layers and adjustment layers to create a randomly colored jumble of lines.

Adjustments added to the background result

You do not need to keep the rectangle lines and pattern in the same color and form as before and effects such as blurs as well as adjustments such as black and white adjustment layer can be added to the artwork to create all kinds of wonderful variations of backgrounds from a single rectangle line


The image on the right was created using a gaussian blur along with an adjustment black and white filter and tint.

Other tutorials

1. how to copy Photoshop patterns to psp and Affinity Photo

2. how to create a pyramid pattern in Photoshop

Other resources

1. line and linear rectangle brushes for Photoshop, psp, Affinity Photo etc

Youtube Video tutorial

Tutorial on the creating of lines using rectangles [Youtube]