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

Illustrator Javascript - Render Swatch Legend - LAB Colour Values Incorrect

Participant ,
Sep 16, 2020 Sep 16, 2020

Hi All!

So, a question regarding the failry well known fab Script written by John Wundes:

renderSwatchLegend.jsx 

I need to create a chart that specifies just the LAB values underneith the swatches that the script creates, but curiously, the LAB values that the script produces are always wrong - they're always out by a digit and I don't know why. 

 

If I double click the swatch in the swatch palette, the LAB value is correct/as it should be, it is just the text that the script produces and lays onto the artboard that is incorrect. Please see following image. Any ideas why this glitch is happening?

 

This glitch happens consistently on every single import - the lab value that the script generates onto the artboard is never the correct value. Help! 

 

Screenshot 2020-09-16 151903.jpgexpand image

 

 

 

 

 

 

 

TOPICS
Bug , Draw and design , Scripting , Third party plugins
35.5K
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
Adobe
Community Expert ,
Apr 24, 2024 Apr 24, 2024

The first layer of the document may be locked or invisible. Try making it editable.

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
New Here ,
Apr 24, 2024 Apr 24, 2024

Thanks for the suggestion, it works fine now!

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
New Here ,
Jun 25, 2024 Jun 25, 2024

I'm having problems using this too, before the last update on illustrator it worked totally fine, but now it doesn't I've tried all of the others in this thread but none worked 😓

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 ,
Sep 18, 2024 Sep 18, 2024

@Matheus3825881488n1 

 

which version of the script are you using and do you get any error or dialog when running it?

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 Beginner ,
Mar 18, 2025 Mar 18, 2025

Hey @schroef, you definitely have added some great functionality to this amazing script by John Wun. Any chance you could allow the HEX value to be outputted as "#:XXXXXX", meaning hash sign and all caps with no spaces? I know I'm being picky but I think this would allow people to copy paste the HEX codes more easily. This script should be made a feature inside AI, for real!

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 ,
Mar 19, 2025 Mar 19, 2025

@im_campos 

 

Hi there, well that already should work for that hash, I'd I remember correctly. I can check if I can add the capsulized feat. Would we add that as a global or a hex specific feat?

 

You can always do It manually, but yeah script is easier

 

Ps I thinks it's better to link a githubpage vs pasting the complete script here each time. Possible a another forum update can brick the script (like it did couple years back)

 

Current versions V1.5.1

https://github.com/schroef/Illustrator-Scripts/blob/master/renderSwatchLegend.jsx

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 Beginner ,
Mar 19, 2025 Mar 19, 2025

@schroef Rá! I was using an older version...that's why...this one is beautiful. If I could still suggest, if possible, when selecting to "Split Component" I think it would make more sense to display the HEX value in a #AA99CC format than splitting it but the RGB, CMYK and LAB makes sense to be in R:255 G:255 B:255 manner. Nonetheless, this is brilliant. Thanks for improving this script, it always comes ultra handy. 

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 ,
Mar 20, 2025 Mar 20, 2025

I

 

@im_campos @'m now actually trying to implement this

 

Though I made the choice not to join hex when split is in. This was causing to much issues and I needwd to make tons of catches in the script to get it working. It kept glitching out

 

So now when you toggle split, join hex hex gets disabled.

 

I've also added an option to add # and possibly to make it uppercase

 

Also working in that error when a layer is hidden or locked. Thought I had fixed that, but seems I did not

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 Beginner ,
Mar 20, 2025 Mar 20, 2025

You're the best @schroef !!! Looking forward to this update.

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 ,
Mar 20, 2025 Mar 20, 2025

@im_campos 

 

Okay got it

 

Try this version v..1.5.3


    [1.5.3] 2025-03-20
    Fixed
    - Error when active layer is locked or hidden
    - Join HEX was not working when split was active

    Added
    - # tag toggle for HEX
    - HEX is now all capitalized
Preview dialog  v1.5.3Preview dialog v1.5.3expand image
 
When Join or add # is ON before you toggle Split Components, it will remember the choice made earlier. However, idid go so fas as to store this local file
 
 
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 Beginner ,
Mar 20, 2025 Mar 20, 2025

Hey @schroef just providing feedback on this last build

1- When Join HEX is selected but Add # is NOT, the output is not coming out joined

2- When I selected both Join HEX and Add # and then selected Split Components, it ignored and unselected Join HEX and Add #

 

Other than that is really looking amazing.

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 ,
Mar 22, 2025 Mar 22, 2025

1. I need to check that

 I thought i checked every combo possible

2. That is by design as stated before. Getting joined and split working is so much hustle. I couldn't get it to work. I'm no real developer, I like tonfiddle with code. My code is probably not optimized and full of not optimized parts. This is the best I could come up with. Prior to this edit. It seemed join hex and Split components didn't even work. That's why I chose to deactivate them. It looks messy when they are activated. The hashtag would get added right before the first pair of color components. By that I mean, the 2 first pair of characters or numbers. That just looked plain weird. So I made the decision, not use that, when split components is active

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 Beginner ,
Mar 22, 2025 Mar 22, 2025

Don't beat yourself up @schroef, you might not be a developer but you've done amazing with this so far...be proud.

None of my suggestions were deal breakers, this script is a time saver for sure.

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 ,
Mar 22, 2025 Mar 22, 2025

But, I was kinda thinking this script is done. I mean illustrator has this functionality now natively since last year, if in recall correctly.

 

It's innthe context menu of the swatch panel. It looks different though. They deserve gn it like it ink sample. It looks nice. It has a white border around it. It kinda reminds me of pantone color swatch tag, if that's is the correct name

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 ,
Mar 23, 2025 Mar 23, 2025

"I mean illustrator has this functionality now natively since last year, if in recall correctly."

The script is still superior.

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 ,
Mar 24, 2025 Mar 24, 2025

Really? That's nice

 

Still thinking about adding more options like text location placement and also about adding a background chip and font picker.

To much thought, to less time to be able to work on it

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 Beginner ,
Mar 24, 2025 Mar 24, 2025

@schroef I just found out about this feature through you....it's hard to keep up with their new features...I agree with @Ton Frederiks, this script is nice and super handy...

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 ,
Mar 24, 2025 Mar 24, 2025
LATEST

@im_campos 

 

okay should be fixed now. Tried again all variations, think i got it this time

v.1.5.4

https://github.com/schroef/Illustrator-Scripts/blob/master/renderSwatchLegend.jsx

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