Skip to main content
Participant
January 14, 2023
Question

Open Color Picker dialog from C++ plugin

  • January 14, 2023
  • 1 reply
  • 661 views

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. 

This topic has been closed for replies.

1 reply

Community Expert
January 16, 2023

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-the-color-to-the-document-swatches/m-p/3655090#M11329

 

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 )

rob day
Community Expert
Community Expert
January 16, 2023

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.

Community Expert
January 16, 2023

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 )