Copy link to clipboard
Copied
You can only have the hard-coded colours, not custom colours.
/*
Prior to version 2024: "none","red","orange","yellowColor","grain","blue","violet","gray"
New in version 2024: "magenta", "seafoam", "indigo", "fuchsia"
Adding an unsupported name is possible to return "black".
Install this script in the Application folder Presets/Scripts and restart Photoshop.
Assign a custom keyboard shortcut via Edit > Keyboard Shortcuts > File > Scripts
*/
// Set the label color
setLayerLabel
...
Copy link to clipboard
Copied
It isn't a keyboard shortcut, but you can apply a color label to more than one layer at a time. You can Shift + select the layers that you'd like to label with a color, right-click, and in the contextual menu that opens, select Color and then whichever color you want to apply.
Copy link to clipboard
Copied
Thanks for your answer. When your trying to stay organized without layer names and still keep the tempo. This method does not work.
Copy link to clipboard
Copied
@Omineus – This can be scripted and a custom keyboard shortcut applied to the script. Even an action could do it if you were happy with an F-key shortcut.
As there are 11-12 possible colours, this could be a bit convoluted with separate scripts for each colour.
Another option would be to take the extra effort to add a GUI to pick the colour and then one would only need a single script (but would this really be any better than Myra's suggestion of using the standard native feature?).
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You can only have the hard-coded colours, not custom colours.
/*
Prior to version 2024: "none","red","orange","yellowColor","grain","blue","violet","gray"
New in version 2024: "magenta", "seafoam", "indigo", "fuchsia"
Adding an unsupported name is possible to return "black".
Install this script in the Application folder Presets/Scripts and restart Photoshop.
Assign a custom keyboard shortcut via Edit > Keyboard Shortcuts > File > Scripts
*/
// Set the label color
setLayerLabelCol("grain");
function setLayerLabelCol(labelCol) {
var c2t = function (s) {
return app.charIDToTypeID(s);
};
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
var descriptor = new ActionDescriptor();
var descriptor2 = new ActionDescriptor();
var reference = new ActionReference();
reference.putEnumerated(s2t("layer"), s2t("ordinal"), s2t("targetEnum"));
descriptor.putReference(c2t("null"), reference);
descriptor2.putEnumerated(s2t("color"), s2t("color"), s2t(labelCol));
descriptor.putObject(s2t("to"), s2t("layer"), descriptor2);
executeAction(s2t("set"), descriptor, DialogModes.NO);
}
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Very clear. Understood!
Thank you very much!