Copy link to clipboard
Copied
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 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).
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
That's weird. Still good to know. Thanks Theun.
Copy link to clipboard
Copied
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/
Copy link to clipboard
Copied
Marijan, I must admit I never tried to change color sub-parameters ...
But it seems to assume your current color space is CMYK, ¿non? How would you set the color in RGB or Lab?
Copy link to clipboard
Copied
You can change it like this:
myChar.fillColor.space = ColorSpace.RGB;
or
myChar.fillColor.space = ColorSpace.LAB;
And then you change color.
--
tomaxxi
http://indisnip.wordpress.com/
Copy link to clipboard
Copied
Thanks, as suggested I got it to work by creating a swatch. Strangely, to create a swatch you wite doc.colors.add() rahter than doc.swatches.add()
thanks again.
Ariel