Skip navigation
Sephirioth
Currently Being Moderated

From pantone color to rgb value

Apr 10, 2012 5:35 AM

Tags: #color #javascript #windows #extendscript #indesign_server #indesign_scripting

Hi,

 

I'm parsing a single spread, single paged document (newspaper, see my other post) and extracting the content for web use.

 

The textFrames of the pages have a fillColor property. I need to extract this color property as well. Some textFrames have a RGB hex fillColor value, but others have Pantone color values. I need to convert those pantone values to rgb (best approximation). The fillColor property of the textFrame is a Swatch object. As far as I know the only way to get the swatch value is to retrieve Swatch.name, so textFrame.fillColor.name. Color (which is a subclass of Swatch) has the property to define the color space and colorValue property. But I see no way of getting from a Swatch object to a Color object, in other words: I have no idea how to get a RGB value from a pantone value. In the InDesign GUI it is possible to

 

I read in some other post that someone wrote a script to convert swatches, the link however is dead.

 

Does anyone know how to solve this?

 

Setup:

Win2k8 R2 server

InDesignServer CS5.5

JavaScript through ExtendScript

InDesign CS4 document

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points