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

Script Color Picker

Explorer ,
Aug 21, 2012 Aug 21, 2012

Is there a way to make the color picker pop up during a script and allow you to choose a color?

Screen shot 2012-08-21 at 6.01.53 PM.jpg

TOPICS
Actions and scripting
5.6K
Translate
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
Adobe
Community Expert ,
Aug 21, 2012 Aug 21, 2012

At the very least there is a work-around to set the Foreground Color with an intermediate Solid Color Layer.

Translate
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
Guru ,
Aug 22, 2012 Aug 22, 2012

You can use the system one easy enough with script…

$.colorPicker();

Translate
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
Aug 22, 2012 Aug 22, 2012

app.showColorPicker() was added for CS5.

Translate
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
Guru ,
Aug 22, 2012 Aug 22, 2012

As if anybody ever reads the Changes since earlier versions—CS5 changes page… ooops much better thanks

Translate
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 ,
Aug 22, 2012 Aug 22, 2012

Good one!

ExtendScript Toolkit’s Object Model Viewer seems to be missing that.

Translate
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
Aug 22, 2012 Aug 22, 2012

Yes, missed that in the documentation. Darn it!

I always use the runtime documentation: app.reflect.methods or app.reflect.properties

app could be any object, activeDocument, activeLayer, etc.

Translate
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
Enthusiast ,
Feb 03, 2014 Feb 03, 2014

This is a MUST for us.

Thanks for app.reflect.methods + app.reflect.properties



Translate
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
Participant ,
Mar 03, 2014 Mar 03, 2014
LATEST

yes!  just stumbled onto this post. 

THANKYOU for the reflect.methods and reflect.properties.  

(how did I live without that for so long. )

Translate
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
Participant ,
Dec 11, 2013 Dec 11, 2013

I want to place on the form 2 button to select the color for foreground and background. This function -

app.showColorPicker() - assigns a color only the foreground. How to do so she could assign the same color and the background? Or which function changes colors (by analogy with the X button)

Translate
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
Guru ,
Dec 11, 2013 Dec 11, 2013

The code below is the same as pressing x to exchange the foreground and background.

var desc = new ActionDescriptor();

var ref = new ActionReference();

ref.putProperty( charIDToTypeID('Clr '), charIDToTypeID('Clrs') );

desc.putReference( charIDToTypeID('null'), ref);

executeAction( charIDToTypeID('Exch'), desc, DialogModes.NO );

Translate
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