Skip to main content
Participating Frequently
December 20, 2021
Answered

Captions or scripts to label color swatch in document

  • December 20, 2021
  • 1 reply
  • 2462 views

I'm working on a document with lots of squares showing color swatches. The layout is already set and varies by page. I'm looking for a script to work similar to how live captions work for images. If possible, I would like it to be dynamic so if I change the color in the square the name under it changes to the new color swatch name. Is there a script to to add color names under preset color swatches on a page? Or is there a way to do this with live captions?

 

I was given a script that can make squares with the swatches name in a grid pattern, but my format isn't just a consistent grid and I want the colors in a certain order. I'm looking for something that works more closely like a caption for images. When the image changes the caption under changes. So when the color swatch used changes the color name listed below would also change.

 

I haven't been able to find this so far so also is there anyone out there who can make this kind of script? 

 

Any guidance on who to contact to make custom scripts would be useful!

 

Thank you!

This topic has been closed for replies.
Correct answer willcampbell7

In case you missed the edit to my earlier reply, here is the latest link to get the swatches script, and another separate script for labeling images with their file name.

 

https://www.marspremedia.com/software/indesign/swatch-names

 

https://www.marspremedia.com/software/indesign/image-names

 


I also made a video tutorial for the script:

 

https://youtu.be/BPItfdZJtsc

 

1 reply

willcampbell7
Legend
December 21, 2021

The dynamic aspect won't be posssible with a script (at least, easily). Scripts run when you ask them to, then are done. It's not usual for a script to continuously poll the document for changes, then act. Are the color labels the swatch names? If so, it wouldn't be difficult to make a script to run each time you update the color patches, and the script either generates the labels from the swatch names (if they don't exist) or if they do exist, replaces them with the current swatch names assigned to each color patch.

 

Script writing is what I do, free ones, and for-hire custom solutions. Your need sounds like a good idea for a new script, which I'm always on the watch for. I may try some ideas but still curious if the swatch name is what you're after. That shouldn't be too diffcult.

 

See my scripts here (most are free download): https://www.marspremedia.com/software/

Custom stuff the fee varies of course depending on complexity.

 

William Campbell
KMColorAuthor
Participating Frequently
December 21, 2021

Hi William,

I wasn't sure if a script could work like a dynamic live caption on an image, but it makes sense that it wouldn't. It would work for me though if I colored the boxes and then just ran the switch everytime I made adjustments. Below is an example of what it would be like. (For those boxes that are colored, the name of the color swatch appears below the color box. 

 

I have many rows and columns of boxes, but not all rows consistent with the same number of boxes. The box size and font would all be consistent though. There are thousands of boxes and typing the color swatch name each time is time consuming and could have typos. 

 

If you could make a script to help make this work, that would be amazing! If it is something that would require custom development, please let me know and we can discuss.

 

Thank you!

willcampbell7
willcampbell7Correct answer
Legend
January 3, 2022

In case you missed the edit to my earlier reply, here is the latest link to get the swatches script, and another separate script for labeling images with their file name.

 

https://www.marspremedia.com/software/indesign/swatch-names

 

https://www.marspremedia.com/software/indesign/image-names

 


I also made a video tutorial for the script:

 

https://youtu.be/BPItfdZJtsc

 

William Campbell