ColorList Script: make a list of colors from a selection

With this script you can quickly create a list of colors you use in a selected object or a group of objects. The ColorList is a combination of an action and a script for Adobe Illustrator. In this blog post I want to explain how to install and use it. Below you can see the video with the short introduction on how this feature works.

In order to use this feature you need to download the files here. You’ll get a ZIP-folder. After unzipping the folder you’ll get a folder with two files: ColorList Action.aia and ColorList.jsx.

Action (ColorList Action.aia) file

Step 1: Save .aia file

To begin with, save the ColorList Action file in some directory on your computer. To be sure to find it again, I suggest saving it in the Adobe Illustrator Actions folder.

Windows

C:\Program Files\Adobe\Adobe Illustrator CC 2020\Presets\en_US\Actions

Mac-OX

/Applications/Adobe Illustrator 2020/ Presets/en_US/Actions

Step 2: Load Action

Next, open the Actions Window in the Adobe Illustrator application. If it’s not open you can easily find it. Navigate to Windows in the top bar of Illustrator and choose Actions from the drop-down menu.

When the Actions window opens, click on the burger bar in the top right corner and choose Load Actions from the drop-down menu. The picture below illustrates this.

ColorList script

Afterward, navigate to the folder where you saved the ColorList Action file and open it.

ColorList Action

As a result you can see the action ColorList appears in the Actions window. We are almost there, but I would like to apply some custom options for a better workflow.

ColorList script instructions

Step 3: Action Options

For a better workflow, you can change some options in order to use Hot Keys and Actions Button mode. Additionally, you are very welcome to read my post about how to record an action in order to run a script here.

With the ColorList action selected in the window click burger icon in the top right corner of the Actions window. Select Action Options from drop down menu as shown in the picture below.

ColorLIst script

Accordingly, the Action Options window opens and you can set you preferable settings for a Function Key as well as choose a Color for the Button View.

ColorList script instractions

ColorList.jsx

Now it’s time to save the script file ColorList.jsx file. In order to make the action work, you must save it in Adobe Illustrator Scripts folder. Be aware that my path can slightly vary from yours.

Windows

C:\Program Files\Adobe\Adobe Illustrator CC 2020\Presets\en_US\Scripts

Mac-OX

/Applications/Adobe Illustrator 2020/ Presets/en_US/Scripts

After all is done, restart Adobe Illustrator.

Run the ColorList Action

Finally, you can try the Color List script/action. Always start by selecting the object you want to execute colors from. In fact there are three ways to run the action.

In case you followed the instractions in step 3, you can use the quickly way to create a list of colors by pressing the Function Key you assign to the ColorList action.

Else: Open the Action window and switch it to the Button Mode as shown in the picture below. Therefrom you can just press the right button.

Or with the Action window opened, choose the ColorList script and then press the Play Current Selection button as I showed in the picture below.

Custom Form for your Swatch Icon

Alternatively, you can replace the rectangle with your own shape. You can draw your own shape and name it “myForm” in the layers panel.

ColorList blog post

The next time you run the script, the rectangle will be replaced with your shape. Keep in mind that this only works for a regular path element, a group or compound path will not work.

ColorLIst script

In the end, I want to make you aware that this script unfortunately cannot pull colors from placed or embedded images. This is due to the fact that the Adobe Illustrator is just unable to extract colors from pixel images.

I hope you’ll be happy with this script and find it beneficial in your everyday work. I’ll be happy to hear your opinion and impression of it. I’ll also be very pleased, if you make me aware of some issues or if you have some ideas for improvement. So please, don’t be shy to leave a comment or write me a message.

Leave a Comment