Copy link to clipboard
Copied
Hello Community!
I am looking for a way to generate textboxes on top of paths that contain fill color information:
- Hex (probably not possible?)
- CMYK values
- RGB values.
Ideally you would select paths on your artboard, run the script and text boxes would be generated as such:
This script comes close, but does it for swatches in the document. However, I need it for the fill color for paths already on the artboard:
http://fashionclassroom.com/blog/handy-illustrator-script-for-printing-out-color-chips
https://github.com/johnwun/js4ai/blob/master/renderSwatchLegend.jsx
Also here is some discussion that touches on the subject: https://webcache.googleusercontent.com/search?q=cache:fLUn9JnVfDkJ:https://forums.adobe.com/thread/6...
Any help would be greatly appreciated!
Best regards,
Martin
Did you know that you can create a new color group from the selected paths?
Simply select your paths and push the "new color group" button at the swatch panel...
Then you can use the rederSwatchLegend.jsx from wundes
Maybe you have to modify it first...
If you saved it and changeed it to .JSX it should work fine. Ive got a link to my version here, https://github.com/schroef/Illustrator-Scripts/blob/master/renderSwatchLegend_v145.jsx
again click raw and make sure you save it and try to replace the .txt to .jsx
Ah yeah, that is due to the separator. Perhaps I should add an extra Rule for that as an option. Let me see if I can add this. I'll post an update link later.
It's always better to save the file directly to jsx from the browser unless you know how to save the file in a proper format without issues.
I got it working now as i think you asked for. Ive added an extra option, to join HEX values, this can keep other values split
Here's a link to the RAW script on my gitHub. Remember when saving from browser, remove .txt at the end
Copy link to clipboard
Copied
For some reason when I place the renderSwatchLegend.jsx I downloaded into the Illustrator 2025 / Presets / en_US / Scripts folder, and start Illustrator 2025, I dont see it listed. The other 3 default script are listed. Also using "file > Scripts > Other scripts" doesnt seem to work.
Copy link to clipboard
Copied
Is it a TXT file?
Does it have the correct file extension?
Copy link to clipboard
Copied
Describe your system information. macOS Monterey + Illustrator v29.0.1 have no problems installing this script or running it via Other Script.
Copy link to clipboard
Copied
Do the files end with .jsx?
Is it possible to make a screen grab?
There should be other scripts in there as well, you mean those also don't show/work? That would be kinda strange. Many of those a native illustrator scripts