Skip to main content
Participant
October 5, 2010
Beantwortet

To Show/Display Color Picker Panel to user for creating Swatch- in SCRITPING

  • October 5, 2010
  • 1 Antwort
  • 1833 Ansichten

Hi All

I'm in need to Show/Display "Color Picker Panel" in InDesign, to the user to select their desire color to create a swatch  through SCRIPTING. Can anyone help me in this.

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von milligramme

I wrote a similar ColorPicker Script sample in the past, too.

  • create document
  • create rectangle object
  • show ColorPicker
  • choose color with ColorPicker
  • create RGB color swatch
  • (convert to CMYK color swatch)
  • coloring rectangle object to this swatch

http://www.milligramme.cc/wp/2010/02/extendscript_colorpicker.html

mg

1 Antwort

Harbs.
Legend
October 5, 2010

$.colorPicker();

Harbs

Participant
October 6, 2010

thanks Harbs, it works good.

But, one more thing, how to get CMYK from this color picker .It gives numeric value for our every color picking. My need is to get its CMYK or RGB Value.

For example,

while selecting "C=78, M=29, Y=59, K=27" on colorpicker it calling method returns value "2447174".

Harbs.
Legend
October 6, 2010

From the tools guide:

colorPicker()

$.colorPicker (name)

Invokes the platform-specific color selection dialog, and returns the selected color as a

hexadecimal RGB value: 0xRRGGBB.

name: The color to be preselected in the dialog, as a hexadecimal RGB value

(0xRRGGBB), or -1 for the platform default.

Google convert hexadecimal rgb in javascript for how to convert the values...

Harbs