Skip to main content
TᴀW
Legend
December 9, 2010
Answered

apply fillColor to character without creating swatch?

  • December 9, 2010
  • 1 reply
  • 1237 views

Okay, I give up!!

HOW do you apply a fill color to a character (myChar) without creating a swatch?!?! You can do it in the UI by using the Color palette.

The SDK help says that fillColor can take a Swatch or a string. But I cannot find any information anywhere including the web on what that string should be.

frrrrustrating..

Thanks

Ariel

example: myChar.fillColor = [10,20,30,40] doesn't work -- well, it's not a string!, but neither does ... = "C=10 M=20 Y=30 K=40"

This topic has been closed for replies.
Correct answer Jongware

This has been asked before, over and over again, and it never has lead to a satisfying answer. Seems it's just Not Possible.

The string mentioned is a Swatch name (well, probably).

1 reply

Jongware
Community Expert
JongwareCommunity ExpertCorrect answer
Community Expert
December 9, 2010

This has been asked before, over and over again, and it never has lead to a satisfying answer. Seems it's just Not Possible.

The string mentioned is a Swatch name (well, probably).

TᴀW
TᴀWAuthor
Legend
December 9, 2010

That's weird. Still good to know. Thanks Theun.

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators
tomaxxi
Inspiring
December 9, 2010

OK, here is the deal.

You can change character folor fill like this:

myChar.fillColor.colorValue = [40,0,100,0];

BUT, you have to keep in mind that this will NOT work

if you want to change it from Black swatch because Black Swatch is locked.

Also, this WILL change your Swatch color.

What you porbably do is to create temporary Swatch

apply it to character, delete Swatch and then change color.

Also, you can change character fill color space like this:

myChar.fillColor.space = ColorSpace.RGB;

Hope that helps.

--

tomaxxi

http://indisnip.wordpress.com/