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.


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


/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


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.


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


/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.

16 thoughts on “ColorList Script: make a list of colors from a selection”

  1. Hi…is there a way of getting the web safe RGB codes for online design work? I need to use Canva for a client and want to upload a number of brand colours I’ve created for the project but it only excepts hex codes. Any ideas? Thanks, Daniel

    • Hi Daniel
      Thank you for your comment and your interest in this script.
      This is very possible and you are not the first to ask about it. 🙂 I am planning to see how to add hex colours to this script. But I am currently busy with paying clients and will be able to tackle this script when their project is complete.

    • Hi, Jagdish. Thank you. Glad to hear that you like the ColorLIst script. I am planning to add hex colours to the script. I hope that in the near future I will have time for this.

  2. This is a fantastic script and I can see my team using this in their regular workflow.
    Is there an easy change to the script to display CMYK with 2 decimal places? As currently, it rounds these up/down to the nearest whole number.


    • Hi Ben, thanks for your comment. I’m so glad to hear that you are using my script and that your team likes it. I looked to see if I could help you with your request, but unfortunately, I don’t see an easy way right now, and I don’t have time to do it. However, I will keep your request in mind for the future.

  3. Very usefull and thanks for the share. Could i use parts of the code?
    Im working again on this Logo Packer panel ive helped with. Its a panel for quick and easy creation of logo types. It exports the logos in all kinds of formats, very handy when you need deliver these to the client.
    you can find it here github com / schroef / logo-packer
    sorry for the weird address, sometimes comments get deleted when they have outbound link

    • Hi Rombout, thank you for your comment. Sorry for the delay in replying, I was on vacation. Of course, you can use some of my code in your plugin. No problem.

      • Perhaps handy for you as well. I was looking more into return color info from swatches and for more version. One is really nice, because it adds all color types. I added HEX to it myself and did some more minor work.
        Im thinking of adjusting it so i can show only those i want per run. You can find my version here;

        It was originally created by Wundes, perhaps you’ve heard from him. He has some really nice scripts

        Another really nice of is by
        jmsdnns it exports all swatches and the color codes into a CVS. ive adjusted this so it only does the selected ones. I think ill add the code from the other one, to this one. Could become handy one day

        I thought, i’d share my findings with you as you also shared you script and info

        • Thank you for your involvement and for sharing these links. I also know these scripts because I came across them while writing the ColorLIst script and some other swatches-related scripts. It will be interesting to write a blog on this topic.
          In any case, as I see, many people are interested in an improved version of the ColorList script. So hopefully, I’ll find the time to do it, and I hope I can use a part of your code for HEX colours.

  4. I’ve not tried this script but it sounds like just what I’ve needed for years. You should start a GoFundMe. I’m sure you’d get people to donate a little and that could help add the RGB and Hex codes. That would be incredible. Thank you for your effort!

    • Thank you for your comment. I’m glad to hear that the ColorList script will be helpful to you. Thanks for the donation advice. I’ll see what the possibilities are.


Leave a Comment