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

A script to look at one group og swatches and replace with another group of swatches

New Here ,
Sep 08, 2023 Sep 08, 2023

Hello! I'm looking for a script or a way to script a little productivity matter for work. 

 

Let me provide a little context - I create social media graphics. I have a template file in Illustrator for some graphic design overlays to go. I have assigned all the objects a text a swatch and given that swatch a name. I have also created groups that will allow me to alt-drag swatches to recolour the artwork in the template I need.

 

Screenshot (12).png

 

When I wish to change the colour scheme of a graphic, I alt-drag the swatches from one theme (e.g. HCA 3 > Working Pallet.) This recolours the artwork to the template style I need.

 

So this; 

Screenshot (13).png

 

Becomes this;

Screenshot (14).png

 

My question is this-

Is there a way to automate this process with a script? 


I don't mind if the script switches out colours from one group to another or if I have to assign a new RGB value to the working pallet group swatch for each individual swatch. Any input on this would be greatly appreciated. Thank you for your time. 🙂 

TOPICS
How-to , Scripting
483
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

correct answers 1 Correct answer

Enthusiast , Sep 09, 2023 Sep 09, 2023

Check the script https://gist.github.com/creold/50165f03645376365df782b60269c326. Optionally, I added the ability to replace spot colors by their order in the group, rather than by matching part of the name string

replaceSwatchGroup.gif

Translate
Adobe
Enthusiast ,
Sep 09, 2023 Sep 09, 2023

Check the script https://gist.github.com/creold/50165f03645376365df782b60269c326. Optionally, I added the ability to replace spot colors by their order in the group, rather than by matching part of the name string

replaceSwatchGroup.gif

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
Enthusiast ,
Oct 08, 2023 Oct 08, 2023
LATEST

Created a more flexible version of the script - ColorGroupReplacer

ColorGroupReplacer.gif

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