Deco Scripted Patterns in Photoshop

Radomír Měch

Adobe Research

Daichi Ito

Adobe Research

Photoshop CS6

Photoshop CS6 contained five scripted patterns that can be accessed by right clicking on a path, selecting Fill, or by selecting Fill from the Edit Menu. Once you have the fill dialog box you choose Pattern in the Use selection box, and check the checkbox Scripted Patterns:


Here are examples of patterns generated by scripted Deco pattern fills in Photoshop CS6: Brick Fill (a), Cross Weave (b), Random Fill (c), Spiral (d), and Symmetry Fill (e).


Photoshop CC

Photoshop CC (14.2, January 2014) enhances the exitsting 5 scripted patterns and introduces 3 new patterns, Place Along Path, Picture Frame, and Tree.


All scripts, old and new now open a new dialog box where the user can change various parameters of the scripted fills. This is what you get when you click Brick Fill, for example (the parameter setting shown are not the default):


Here are the same patterns as shown above, this time with different parameters set in the script specific dialog (Photoshop CC only): Brick Fill (a), Cross Weave (b), Random Fill (c), Spiral (d), and Symmetry Fill (e).


Below are patterns generated by the 3 new scripts in Photoshop CC: the sequence of feathers generated using the Place Along Path script is placed inside a frame generated by the Picture Frame script (a); result of the Tree script (b):


Under the hood

Photoshop CC includes eight JavaScript files that define eight distinct scripted patterns. These patterns are executed by the Deco framework, which is a scriptable environment that is tailored for creating procedural patterns. These five JavaScript files are located in the following directory:

Windows 32 bit:

Program Files (x86)AdobeAdobe Photoshop CCPresetsDeco

Windows 64 bit:

Program FilesAdobeAdobe Photoshop CC (64 Bit)PresetsDeco


/Applications/Adobe Photoshop CC/Presets/Deco

It is possible to create new patterns by defining new scripts and placing them into the directories above. The Deco script file acts as a pattern preset and when a new file is added to these directories, the name of the file appears in the Scripted Patterns pull-down menu and the pattern is ready to be used.Note that you can also place your scripts to a user directory. On windows it is:

C:UsersyourUserNameAppDataRoamingAdobeAdobe PhotoshopCCPresetsDeco

On mac the directory is:

~Library/Application Support/Adobe/Adobe Photoshop CC/Presets/Deco.

Keep in mind that unless you run

chflags nohidden ~/Library

in a terminal, you may not see the Library folder in Finder.

Where to get new patterns

There has been a vibrant community of users already at the CS6 pre-release forums. A few users created new scripts and some managed to cleverly combine regular Photoshop scripts with Deco scripts to extend the functionality of the feature. For example, Chuck Ubele created a Photoshop script that provides a rich menu of options for the Deco script shipped in Photoshop CS6 and one new script (see his website). Others then created beautiful patterns using these new scripts. In fact, the dialog that you see in Photoshop CC has been based on his script and Chuck allowed me to use it as a base for the dialog script we ship.

For now you can dowload new scripts at the end of this page or from the forum

Once you dowload a script, place it to one of the directories listed above. The file needs to have the extension jsx. You may have to make the directory writeable to do be able to copy the file there. Depending on your version of Photoshop the new fill (with the same name as your script file) will appear in the pull down menu for scripted fills either when you open the Fill panel or after you restart Photoshop.

Where to meet other users interested in scripted patterns

The topic related to Deco scripted patterns are discussed in the Photoshop Scripting forum:


How to create your own scripted patterns

You can download a documentation on writing your own Deco scripts below. Feel free to contact Radomír Měch or ask other users in the forum. Don’t forget to share your scripts or the resulting patterns! Have fun!



Deco Scripted Patterns for Photoshop CS6

The three scripts below were designed for Photoshop CS6. They will work in Photosyhop CC, but they will not have the dialog panel where you can adjust
the parameters. They should be placed to Presets directory, listed above. Please save them with a jsx extension (select Save As in the browser – in the menu or right click on the link, select type All Files and add the .jsx to the file name – Firefox does better job at it than Internet Explorer). New fills will appear in the Fill palette pulldown menu:

  • Random Fill Boundary.jsx a modified version of the shipping Random Fill script, in which the pattern is placed only near the edge of a rectangular selection.
  • Random Fill Boundary Rotate.jsx a version of the script above, in which the pattern is also rotated when it is placed near the edge.
  • Random Fill Boundary Rotate Color.jsx – a version of the script above, in which the color of the placed pattern is randomly varied (this was a very succesful script on pre-release forum).

Note that in Photoshop CC these scripts are not needed. The same results can be achieved by drawing a path and using Random Fill scripter pattern. Controlling various parameters in the dialog box allows to create much larger variety of randomized borders.

Photoshop CS6 Scripts Combined with Deco Scripts

The scripts below were created by Richard Y. Kain. They combine a regular photoshop script that defines a user interface and a deco script that then defines the resulting pattern using the input from the regular script.

Photoshop CS6 Script Providing UI for Shipped Scripts

This is a regular Photoshop script that enhances enhance the functionality of scripted patterns. It can be placed anywhere and then it should be executed using File->Scripts->Browse.

  • Chuck Uebele’s Scripted Fill UI – this script creates User Interface, allowing the users to modify various parameters of scripted patterns, without having to edit the files.

Note that you do not have to use this script in Photoshop CC, you get a dialog for each script.