Skip to main content
Participating Frequently
February 22, 2014
Answered

Show color picker dialog JSX / CSAW

  • February 22, 2014
  • 3 replies
  • 11081 views

Can someone guide me on how to show the color picker dialog in Illustrator programmatically?

In photoshop that's really easy, just:

     app.showColorPicker(true);

In Illustrator I couldn't find any reference to such a method or other possibility to show the dialog programmatically, that you would normally get when double clicking on the fill color square within Illustrator.

Is that possible by using app.executeMenuCommand or some other method?

I am writing a script that opens the color picker dialog in reaction to a click on a button. I want to be able to get the chosen color and use it within the script.

thanks for the help!

Dominik

This topic has been closed for replies.
Correct answer CarlosCanto

I'm not sure if you can bring up Illustrator's color picker, in the mean time you can play with JS color picker

alert($.colorPicker ());

3 replies

Inventsable
Legend
June 15, 2020

In case any one is reading this in the future like I was earlier today, you can indeed use the native color picker:

var startColor = new CMYKColor();
var result = app.showColorPicker(startColor);

alert(result)
schroef
Inspiring
May 11, 2020

It does show the picker, issue is. When I link this to a button for say a dialog window. Closing the colorpicker also closes the dialog window. I wanted to use this method to let user refine a color. 


CarlosCanto
Community Expert
CarlosCantoCommunity ExpertCorrect answer
Community Expert
February 22, 2014

I'm not sure if you can bring up Illustrator's color picker, in the mean time you can play with JS color picker

alert($.colorPicker ());

Participating Frequently
February 22, 2014

Hey Carlos, thanks for the fast answer!

Yeah I already saw that it's possible to bring up the native color picker via JSX, is there an easy way to execute the same from an ActionScript environment / or can I execute a jsx script function and get the result from AS?

CarlosCanto
Community Expert
Community Expert
February 22, 2014

sorry I'm not familiar with AS