Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Get layer colour property

Explorer ,
Nov 10, 2021 Nov 10, 2021

Copy link to clipboard

Copied

In Photoshop, I can change a layer color (in the layers window) to violet with:

 

 

var idsetd = charIDToTypeID( "setd" );
var desc5146 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref1552 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref1552.putEnumerated( idLyr, idOrdn, idTrgt );
desc5146.putReference( idnull, ref1552 );
var idT = charIDToTypeID( "T   " );
var desc5147 = new ActionDescriptor();
var idClr = charIDToTypeID( "Clr " );
var idClr = charIDToTypeID( "Clr " );
var idVlt = charIDToTypeID( "Vlt " );
desc5147.putEnumerated( idClr, idClr, idVlt );
var idLyr = charIDToTypeID( "Lyr " );
desc5146.putObject( idT, idLyr, desc5147 );
executeAction( idsetd, desc5146, DialogModes.NO );

 

 

 

Is there a way to detect such a layer has been changed from "no color" to red or orange? Get, rather than set? There doesn't seem to be an art layer property for this.

TOPICS
Actions and scripting

Views

39

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 10, 2021 Nov 10, 2021

Copy link to clipboard

Copied

You might get better answers in the Photoshop ecosystem community. Use the Actions & scripting tag.

Actions and scripting

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

LATEST

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines