Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Issue in updating color in illustrator.

New Here ,
Jan 16, 2024 Jan 16, 2024

srgampa_0-1705431355150.pngexpand image

I am trying to update colors of the above texts using :

 

  var _existSpot = app.activeDocument.swatches.getByName(
             result[index].colorValue
            );  
            var spotSwatch = app.documents[0].swatches.getByName(
              "$" + result[index].labelName
            );          
            app.activeDocument.defaultFillColor = spotSwatch.color;
            app.executeMenuCommand("Find Fill & Stroke menu item");           
            app.activeDocument.defaultFillColor = _existSpot.color;
 
-----------------------------------------------------------------
But only the text with single color is changing but not text with strokes.
 
can someone help me regarding the issue;
 
Thanks. 🙂
TOPICS
Draw and design , How-to
126
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jan 16, 2024 Jan 16, 2024

can you post what "result" refers to?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 17, 2024 Jan 17, 2024
LATEST

Hello Carlos, 

The result above refers to a object of data that contains the color data that are needed to be updated in the template.

It looks like this:

{"labelName":"Team Color 1","colorValue":"Atlas Blue (2380 C)","colorCode":"#1e2b4f","colorObjectFromXML":{"Name":"Atlas Blue","C":"79.7604322433472","M":"71.1238265037537","Y":"47.4525034427643","K":"40.9582644701004","Hex":"#1e2b4f","PMS":"2380 C","$$hashKey":null}}

 

Thank you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines