Scripting Illustrator CS - font color

Is it possible to change the fill color of a text object and if so how?

Thanks!

Yes you can! Very easy… :smiley:


tell application "Illustrator CS"
	set fill color of character 2 of text frame 1 of current document to {cyan:50.0, magenta:20.0, yellow:20.0, black:0.0} 
	set fill color of word 2 of text frame 1 of current document to {cyan:30.0, magenta:80.0, yellow:20.0, black:0.0} 
end tell

instead of “character” and “word” you can also use “insertion point”, “line”, “paragraph” and “text”.

Thanks again MarcoP! I’ve found solutions to some of my other problems by searching the forums that you have been in and asked the same thing. :smiley:

Haha… Glad I could help you also in that way :stuck_out_tongue: