0
Issue in updating color in illustrator.
New Here
,
/t5/illustrator-discussions/issue-in-updating-color-in-illustrator/td-p/14359518
Jan 16, 2024
Jan 16, 2024
Copy link to clipboard
Copied
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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explore related tutorials & articles
Community Expert
,
/t5/illustrator-discussions/issue-in-updating-color-in-illustrator/m-p/14360336#M394041
Jan 16, 2024
Jan 16, 2024
Copy link to clipboard
Copied
can you post what "result" refers to?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
srgampa
AUTHOR
New Here
,
LATEST
/t5/illustrator-discussions/issue-in-updating-color-in-illustrator/m-p/14360748#M394056
Jan 17, 2024
Jan 17, 2024
Copy link to clipboard
Copied
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

