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

Open Color Picker dialog from C++ plugin

New Here ,
Jan 14, 2023 Jan 14, 2023

Copy link to clipboard

Copied

Hello,

I am trying to invoke the color picker dialog from my C++ plugin. But I can not find a way to do that.

I feel something is missing from SDK regarding the color picker dialog.

Does anyone face such an issue and know how to do that?

I really appreciate any help you can provide. 

TOPICS
How to , SDK

Views

365

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 ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

Hi @Norayr27915025q458 ,

can only help to make the Color dialog visible through ExtendScript:

app.panels.itemByName("$ID/kColor").visible = true;

See:

https://community.adobe.com/t5/indesign-discussions/coloring-a-font-with-a-rgb-etc-without-adding-th...

 

Also my statements at the bottom of this old thread because color mode HSB was added with InDesign 2021 version 16.

To show one of the four options, HSB, LAB, CMYK or RGB requires a second line:

// Example for RGB
app.scriptMenuActions.itemByID( 29191 ).invoke()

FWIW: Found no locale independent name to address the menu action with itemByName().

So look up the four IDs:

/*
		InDesign 2021 version 16 and above:

		IDs for the four different sub-menus of the "Color Panel":
		29188    HSB
		29189    Lab
		29190    CMYK
		29191    RGB
*/

 

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
Community Expert ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

Hi Uwe, Is there a way to open the Color Picker (not the Color panel)? I don’t see it as a menu action, and in the UI I think the only option is to double-click the Toolbar Fill or Stroke or the Color panel’s Fill—there’s no Color Picker menu item.

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 ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

LATEST

Hm. I know what you mean.

Currently I see no way to invoke the Color Picker even if the Color panel is visible.

In my German InDesign I can run this:

 

app.findKeyStrings( "Farbwähler" );

 

It returns an array with one string: ["$ID/kColorPicker"]

So I thought this one should work:

 

app.scriptMenuActions.itemByName( "$ID/kColorPicker" ).invoke();

 

But it throws an error. isValid will return false.

 

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