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.
thanks in advance,
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
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
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
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
Copy link to clipboard
Copied
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