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

Find Color mode

Community Beginner ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

Hai,

     I need to find color mode using indesign scripting. I am searching object model but i can't. Please any one guide me.

Untitled1.png

thanks in advance,

TOPICS
Scripting

Views

1.1K

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

Community Expert , May 23, 2018 May 23, 2018

Hi,

what's available is that:

Adobe InDesign CS6 (8.0) Object Model JS: Color

I did not find a way to add a PANTONE color from the repository to a document by scripting.

Method add() of object Color cannot do that.

Regards,
Uwe

Votes

Translate

Translate
Community Expert ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

Hi,

Can you not infer the Colour Mode based on the name?

only checked in CC 2018, but when you select a Colour Mode you seem to get predictable results:

For example:

Colour Choosen     ---- >   Colour Mode

PANTONE P 1-3 C ---- > PANTONE+ CMYK Coated

PANTONE P 1-3 U --- > PANTONE+ CMYK Uncoated

PANTONE 103 CP --- > PANTONE+ Color Bridge Coated

I haven't checked them all but they appear to have a set naming structure:

PANTONE **Colour Information** CHARACTERCODE

Hope this helps

Malcolm

Votes

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
Community Expert ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

Hi,

what's available is that:

Adobe InDesign CS6 (8.0) Object Model JS: Color

I did not find a way to add a PANTONE color from the repository to a document by scripting.

Method add() of object Color cannot do that.

Regards,
Uwe

Votes

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
Community Expert ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

I found a hint in the IDML Specifications. Also did a test with an edited IDMS file where a PANTONE color from the repository was used. InDesign identifies a spot color out of the repositories with a property that is not available by scripting: SwatchCreatorID.

You can check that yourself. Just use PANTONE colors, fill a rectangle, export to IDMS and see for the value of SwatchCreatorID.

From page 264 of idml-specifications.pdf :

Name:

SwatchCreatorID

Type;

int

Required:

No

Description:

The unique ID of the creator (or vendor) of the swatch. SwatchCreatorID is useful when the swatch added is from a color library that InDesign shipped with. The SwatchCreatorID allows InDesign to load the proper color/swatch library quickly. If it is an user defined swatch, it simply defaults to the InDesign SwatchCreatorID.

Ok. That would you give a hint how to add a swatch from a color library. Or to identify one if you come accross one. That would imply to export to IDMS and inspect the IDMS code.

Regards,
Uwe

Votes

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
Community Expert ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

LATEST

Here a hint for exporting IDMS snippets and reading out Property keyValuePair with values for attribute key and attribute value from the snippet file.

Script sample by Loic Aigon ( thank you very much! 😞

Re: List of all scripts labels

That snippet edited using Property Color with attributes Self and SwatchCreatorID should keep you starting, I think.

Then you are able to make the link from the id number to a given color library.

Example: 31520 stands for PANTONE+ CMYK Coated

Regards,
Uwe

Votes

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