• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Get layer colour property

Engaged ,
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

107

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 Expert ,
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— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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
People's Champ ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

LATEST

Votes

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