4 Replies Latest reply on Jun 30, 2017 2:37 PM by Silly-V

    How to get text fill color, from the appearance panel with jsx script

    jonathanl79017929

      I'm attempting to create an illustrator jsx script that reads text color that was applied through a graphic style.

      When applying a graphic style to text, the actual color of the text does not change. Instead a fill color is added in the appearance panel.

       

      What I would like to be able to do is read the fill color for the text frame that has been applied through the appearance panel.

      From searching it seems that this is not possible directly through script... unless I'm missing something.

      Pulling color through the text's characterAttributes will only pull a color that is not set through the appearance panel. Further, if a color is applied through the appearance panel, the characterAttributes color is set to nothing ([No Color]).

       

      Are there any other techniques for getting text color that was applied through a graphic style?

       

      The only other options I've seen is a complex setup of running an action via script, and the action will interact with the appearance panel. But this solution seems very complicated and requires each user to have the action installed, as well as the script.

       

      Any and all thoughts are greatly appreciated