Skip to main content
Participant
September 23, 2024
Answered

Page label color of "none"

  • September 23, 2024
  • 4 replies
  • 837 views

I found a handy javascript online for Indesign that changes the page label color to green – which is great. I often color code my pages with green or red labels to keep track of client selects and as a script I can map these commands to keyboard shortcuts. Does anyone know how to ammend the script to reset the color label to the default label color of none?:

 

app.activeWindow.activePage.pageColor = UIColors.GREEN;
 
This topic has been closed for replies.
Correct answer brian_p_dts

PageColorOptions.NOTHING

 

Works too I think

4 replies

Community Expert
September 24, 2024

Hi @jenniferd93478144 ,

well, the default for page label color is:

PageColorOptions.USE_MASTER_COLOR

 

Regards,
Uwe Laubender
( Adobe Community Expert )

FRIdNGE
September 23, 2024
if ( app.activeWindow.activePage.pageColor == PageColorOptions.NOTHING ) app.activeWindow.activePage.pageColor = UIColors.GREEN;
else app.activeWindow.activePage.pageColor = PageColorOptions.NOTHING;

 

(^/)  The Jedi

FRIdNGE
September 23, 2024

Funny: associate a keyboard shortcut [ctrl+<] played with the left hand, to this simplistic script:

 

if ( app.activeWindow.activePage.pageColor == PageColorOptions.NOTHING ) app.activeWindow.activePage.pageColor = UIColors.GREEN;
else if (app.activeWindow.activePage.pageColor == UIColors.GREEN ) app.activeWindow.activePage.pageColor = UIColors.RED;
else if (app.activeWindow.activePage.pageColor == UIColors.RED ) app.activeWindow.activePage.pageColor = PageColorOptions.NOTHING;

 

No Color >> Green Color >> Red Color >> No Color >> Green Color …

 

(^/)

Robert at ID-Tasker
Legend
September 23, 2024
brian_p_dts
Community Expert
Community Expert
September 23, 2024

I think you can set it = null;

Robert at ID-Tasker
Legend
September 23, 2024
quote

I think you can set it = null;


By @brian_p_dts

 

You are right: 

 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Page.html

 

brian_p_dts
Community Expert
brian_p_dtsCommunity ExpertCorrect answer
Community Expert
September 23, 2024

PageColorOptions.NOTHING

 

Works too I think