Affinity Photo  Illustrator  Photoshop  Painter  E-mail > tutorials > Photoshop Patterns

Use Rectangle Shapes For Backgrounds In Photoshop Tutorial Beginner's Guide

By Andrew Buckle, Video Tutorial Creator / Designer

Updated : 2021


How to create a rectangle themed pattern in Photoshop tutorial using lines and random fill script.


red lines how to use rectangle shapes for backgroundsThe 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. Make certain that you choose the 'shape layer' option or if you are using the pixel option, use that on a new layer so you can delete the background.


random fill


Delete the background layer via the layers panel. The Photoshop rectangle line is selected by using the rectangular marquee tool. The line design / rectangle design can be as simple as that but you can create far more complex rectangle designs such as parallel lines, lines with different fills, pattern fill lines, dashed lines and many more.


random fill


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 check box.


random fill


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 Adobe 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.


random fill


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


Random fill / script and rectangular patterns

random fill
  1. Go to the edit menu

  2. fill command

  3. select the pattern option

  4. select the script check box

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

  6. select the correct rectangular shape tile

  7. select the random fill option

  8. Click OK.


random fill


  1. 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).


random fill

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.


random fill


You can apply the Photoshop fill multiple times so instead of very low density design, you can have an image totally filled with your rectangle shapes.


You can set the settings in numerous ways such as having randomized color by changing the color and brightness settings and putting them to the max.


random fill


You can also have all the lines pointing upwards or their default position, if you want to randomize the rotation click the rotate pattern box.


random fill


You can also then use multiple layers and adjustment layers to create a randomly colored jumble of lines. The layers can also have effects added to them so you can have one layer blurred and another as is.


You can also create thin and long lines and then set to no rotation in the panel to create an extreme thin line pattern design.


random fill


Adjustments added to the background result

random adjustment

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


Thin line rectangle sources and the rotation has been turned off creates an intense line design


random fill


You can now simply add an adjustment layer above to the rectangle shapes design via the layer menu and new adjustment layer such as adding a vibrance or hue and saturation or black and white, multiple adjustment layers can be added to the rectangle line design.


random fill


Effects can be added to warp and distort the lines such as filter menu and distort and wave or perhaps use the motion blur and set it to upwards and set the radius to create color streaks from the rectangle shapes pattern design.


random fill