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

Script to generate color information textboxes for selected paths

New Here ,
Oct 04, 2019 Oct 04, 2019

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:

Screen Shot 2019-10-04 at 4.57.22 PM.png

 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

TOPICS
Scripting , Tools
29.6K
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 4 Correct answers

Advocate , Oct 05, 2019 Oct 05, 2019

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

Translate
Advisor , Feb 06, 2023 Feb 06, 2023

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 

Screen Shot 2023-02-06 at 17.26.31.pngScreen Shot 2023-02-06 at 17.26.26.png

Translate
Advisor , Feb 07, 2023 Feb 07, 2023

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.

Translate
Advisor , Mar 01, 2023 Mar 01, 2023

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

Example of outputExample of outputAdded option join HEXAdded option join HEX

Here's a link to the RAW script on my gitHub.  Remember when saving from browser, remove .txt at the end

Translate
Adobe
Explorer ,
Nov 20, 2024 Nov 20, 2024

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.

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
Community Expert ,
Nov 20, 2024 Nov 20, 2024

Is it a TXT file?

Does it have the correct file extension?

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 ,
Nov 20, 2024 Nov 20, 2024

Describe your system information. macOS Monterey + Illustrator v29.0.1 have no problems installing this script or running it via Other Script.

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
Advisor ,
Nov 20, 2024 Nov 20, 2024
LATEST

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

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