How to use rectangle shapes for backgrounds in Photoshop Tutorial

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.

Use rectangles to create backgrounds

how to use rectangle shapes for backgrounds tutorial
  1. Select rectangle tool in Photoshop 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

  10. Apply rectangle as a background fill or to a layer etc

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

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]


Return to home page


Commercial use - Royalty free - No time limit, no credit - All by - Secure sales via (c) 1995-2017 Andrew Buckle, Maidstone artist, tel: +44 1622 / 688 375 E-mail: support@ License and usage Privacy Facebook pinterest Twitter Youtube tutorials Instagram Linkedin


The graphic design products are priced in US dollars but they can also be bought in Euros, Yen, UK pounds, etc though please note that there may be additional taxes applicable which will be handled in the secure checkout. If you have any questions or queries about the products, please let us know and I will try and help by e-mail or via youtube etc. You can also add additional products as well as download protection and also purchase a physical CD via the The brushes and patterns etc work in a variety of applications and there are many freebie / samplers available to test them on your system before any purchase but again, if you have any concerns that the brushes etc will work with your favourite application, please let us know. The quickest way is probably to leave a message on our facebook page. The designs can be used as brushes and patterns and shapes etc but they can also be used just as images or layers as well as displacement maps or overlays or masks etc so even if the product is listed as a brush or shape, you can often also use the artwork as a layer and use the layer multiple times in the same project to create all kinds of unique and wonderful designs. The products on this site are copyright of Andrew Buckle but any products and artworks you create with these items are your copyright.