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

Page label color of "none"

New Here ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

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;
 
TOPICS
Scripting

Views

181

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

correct answers 1 Correct answer

Community Expert , Sep 23, 2024 Sep 23, 2024

PageColorOptions.NOTHING

 

Works too I think

Votes

Translate

Translate
Community Expert ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

I think you can set it = null;

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
Community Expert ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

quote

I think you can set it = null;


By @brian_p_dts

 

You are right: 

 

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

 

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
Community Expert ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

PageColorOptions.NOTHING

 

Works too I think

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
Community Expert ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

 

pageColor 

 

Array of 3 Reals (0 - 255)

PageColorOptions

PageColorOptions.NOTHING

PageColorOptions.USE_MASTER_COLOR 

UIColors

 

The color label of the Page, specified either as an array of three doubles, each in the range 0 to 255 and representing R, G, and B values, or as a UI color. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator or PageColorOptions enumerator.

 

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
Community Expert ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

Hi @brian_p_dts , null is throwing an error for me—"Invalid value for set property 'pageColor'. Expected Array of 3 Reals (0 - 255) or UIColors enumerator or PageColorOptions enumerator, but received null.".

 

I think it needs to be:

 

app.activeWindow.activePage.pageColor = PageColorOptions.NOTHING

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
Community Expert ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

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
Guide ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

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

 

(^/)  The Jedi

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
Guide ,
Sep 23, 2024 Sep 23, 2024

Copy link to clipboard

Copied

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 …

 

(^/)

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
Community Expert ,
Sep 24, 2024 Sep 24, 2024

Copy link to clipboard

Copied

LATEST

Hi @jenniferd93478144 ,

well, the default for page label color is:

PageColorOptions.USE_MASTER_COLOR

 

Regards,
Uwe Laubender
( Adobe Community Expert )

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