Skip to main content
j.khakase
Inspiring
January 11, 2025
Question

How to Embed Brand Swatches into Photoshop template?

  • January 11, 2025
  • 5 replies
  • 557 views

Hello Friends,

Please help me to Embed Brand Swatches into Photoshop template. I am a fan of Illustrator. there I can embed my custom swatches into template file. Same I am expecting into Photoshop Template file.

While I open that template the new psd file should be open with its embeded color swatches only. not global or any other swatches.

So that every time I don't want to load/import that swatches

5 replies

c.pfaffenbichler
Community Expert
Community Expert
January 13, 2025
// delete color swatches and load swatches;
// 2025, use it at your own risk;
var theCheck = true;
while (theCheck == true) {
var theCheck = deleteSwatchesByIndex (1);
};
var theFile = /*insert your aco-file’s fullname as a string here*/;
loadSwatches (theFile);
////////////////////////////////////
////// swatches //////
function loadSwatches (theFile) {
var desc7 = new ActionDescriptor();
var ref2 = new ActionReference();
ref2.putProperty( stringIDToTypeID( "property" ), stringIDToTypeID( "colors" ) );
ref2.putEnumerated( stringIDToTypeID( "application" ), stringIDToTypeID( "ordinal" ), stringIDToTypeID( "targetEnum" ) );
desc7.putReference( stringIDToTypeID( "null" ), ref2 );
desc7.putPath( stringIDToTypeID( "to" ), new File( theFile ) );
var idappend = stringIDToTypeID( "append" );
desc7.putBoolean( idappend, true );
executeAction( stringIDToTypeID( "set" ), desc7, DialogModes.NO );
};
////// swatches //////
function deleteSwatchesByIndex (theIndex) {
try {
var desc4 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putIndex( stringIDToTypeID( "colors" ), theIndex );
desc4.putReference( stringIDToTypeID( "null" ), ref1 );
executeAction( stringIDToTypeID( "delete" ), desc4, DialogModes.NO );
return true;
} catch (e) {return false}
};
c.pfaffenbichler
Community Expert
Community Expert
January 14, 2025

To elaborate: The Script should remove all Color Swatches, then load an aco-file. 

So in practice one could create three versions (one that loads »customer 1«, one that loads »customer 2«, one to restore the default or some other custom swatches) or even one Script that rotates through the three options and asign shortcuts to those/that. 

 

But this risks losing custom swatches one might have created for other purposes, if one did not already save them. 

jane-e
Community Expert
Community Expert
January 13, 2025

@j.khakase 

 

Are you creating the template for just yourself or for others to use?

 

In Illustrator Swatches are saved with the document. In Photoshop they are saved outside of the document and are available from all documents.

 

I can think of two possible solutions (if scripting does not work):

  • If the template is only for yourself, create and save a set of swatches (Swatches panel menu)
  • One thing I have done in PS is to create a sample of each color and put them on one layer, then hide/show the layer as needed.

 

Jane

 

Participant
January 13, 2025

Photoshop doesn't embed swatches directly into templates like Illustrator. To work around this:

  1. Create and save custom swatches in the Swatches panel (Window > Swatches).
  2. Save a custom workspace (Window > Workspace > New Workspace) with swatches included.
  3. Save your design as a .psdt template (File > Save As > Photoshop Template).

Switch to your custom workspace when opening the template to access the swatches. Alternatively, save swatches as .ase or .aco files for easy loading.

c.pfaffenbichler
Community Expert
Community Expert
January 13, 2025

So you want all current Swatches to be removed and only one set of Swatches loaded? 

Bojan Živković11378569
Community Expert
Community Expert
January 11, 2025

It seems Photoshop is a little bit different; once swatches are loaded or saved then loaded, they will remain available to you regardless of the template or document in use. You can also save swatches in the Library and access them at any time.

j.khakase
j.khakaseAuthor
Inspiring
January 13, 2025

Thank you @Bojan Živković11378569 . Actually I am working for 2 brands at a time, both of them them have different colors/swatches. as I open respective template for the brand I should be able to view the its colors into Swatches panel quickly without taking any effort. I know we can import and use through Adobe CC Librarry. but I am looking fastest way to see colors. May be any PS Script which will replace swatches as I run through shortcut will help great.

Bojan Živković11378569
Community Expert
Community Expert
January 13, 2025

I am not a scripter, but I know a few of them @c.pfaffenbichler @Stephen Marsh