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

New Here ,
Oct 04, 2010 Oct 04, 2010

Copy link to clipboard

Copied

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.

TOPICS
Scripting

Views

1.3K

Likes

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

correct answers 1 Correct answer

Contributor , Oct 06, 2010 Oct 06, 2010

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

Likes

Translate

Translate
LEGEND ,
Oct 05, 2010 Oct 05, 2010

Copy link to clipboard

Copied

$.colorPicker();

Harbs

Likes

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
New Here ,
Oct 05, 2010 Oct 05, 2010

Copy link to clipboard

Copied

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".

Likes

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
LEGEND ,
Oct 06, 2010 Oct 06, 2010

Copy link to clipboard

Copied

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

Likes

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
Advisor ,
Oct 06, 2010 Oct 06, 2010

Copy link to clipboard

Copied

Take a look here: http://bit.ly/9kpVZI

--

tomaxxi

http://indisnip.wordpress.com/

Likes

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
Contributor ,
Oct 06, 2010 Oct 06, 2010

Copy link to clipboard

Copied

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

Likes

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
LEGEND ,
Oct 06, 2010 Oct 06, 2010

Copy link to clipboard

Copied

Nice!

Harbs

Likes

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
Contributor ,
Oct 08, 2010 Oct 08, 2010

Copy link to clipboard

Copied

sorry, I changed permalink setting in my weblog.

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

here is new url

http://www.milligramme.cc/wp/archives/588

mg

Likes

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
Enthusiast ,
Aug 26, 2022 Aug 26, 2022

Copy link to clipboard

Copied

LATEST

unluck for me! , i wish to test similar example of this script! but the links not working!, please if anyone had the script to just upload it in fresh link and thanks in advance

 

Best
M.Hasanain

Likes

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