Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you @Bojan Živković . 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.
Copy link to clipboard
Copied
I am not a scripter, but I know a few of them @c.pfaffenbichler @Stephen Marsh
Copy link to clipboard
Copied
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.
By @j.khakase
Are your two template docs:
1) .PSDT files, which open with a generic name such as Untitled-1 etc.
or
2) Are they another format, and if so, do they have a unique identifier in their name "Client-A" or "Client-B" etc?
Otherwise, is there something else in the doc that is unique to identify each client (metadata, layer or group name etc)?
Do you have .aco or .ase files containing the brand colours? Just how many colours for each client are there?
Copy link to clipboard
Copied
So you want all current Swatches to be removed and only one set of Swatches loaded?
Copy link to clipboard
Copied
Photoshop doesn't embed swatches directly into templates like Illustrator. To work around this:
Switch to your custom workspace when opening the template to access the swatches. Alternatively, save swatches as .ase or .aco files for easy loading.
Copy link to clipboard
Copied
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):
Jane
Copy link to clipboard
Copied
// 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}
};
Copy link to clipboard
Copied
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.