Illustrator Javascript - Render Swatch Legend - LAB Colour Values Incorrect
Copy link to clipboard
Copied
Hi All!
So, a question regarding the failry well known fab Script written by John Wundes:
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!
Explore related tutorials & articles
Copy link to clipboard
Copied
The first layer of the document may be locked or invisible. Try making it editable.
Copy link to clipboard
Copied
Thanks for the suggestion, it works fine now!
Copy link to clipboard
Copied
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 😓
Copy link to clipboard
Copied
which version of the script are you using and do you get any error or dialog when running it?
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
@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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
You're the best @schroef !!! Looking forward to this update.
Copy link to clipboard
Copied
Okay got it
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
"I mean illustrator has this functionality now natively since last year, if in recall correctly."
The script is still superior.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
@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...
Copy link to clipboard
Copied
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

