Copy link to clipboard
Copied
Hello all, thanks for taking the time to help.
Here's my issue... lets say I have 600 different objects in illustrator (just little circles with a fill color, no stroke) and 6 different colors that these circles should be. That means, I'd like about a 100 to be one color, 100 another color, etc... Is there anyway to select all 600 and just tell Illustrator that I have these 6 colors and I want to apply them to the selected objects randomly?
Let me know if this is confusing... hopefully there is some option to do this. I don't want to apply them manually...
Thanks!
OK. Got it. Had to modify the script a bit more.
As I wrote in the previous post, this is done with a random number generator, and that's not exactly what you want. But if you want to play with the script, here is the modified version:
http://harron.home.acedsl.com/Misc/HKA_RandomSwatchFIll.zip
Make sure you make the undeletable swatches -- [none] and [registration] -- the first two in the palette/panel.
Copy link to clipboard
Copied
You might check out the JET_RandomFillSwatches script in this collection by James Talmage.
Copy link to clipboard
Copied
I think that script is a good start! Thank you! Have you used it though? I was wondering if you knew why it included black and transparent as colors in the random swatch group? Any way that I can work around this that you know of? Thank you!
Copy link to clipboard
Copied
I was wondering if you knew why it included black and transparent as colors in the random swatch group?
You can't delete the no-fill and registration swatches from the palette, so I guess they're always included in the group.
I hope James will be along with a solution to this. I'll ponder the script in the meantime.
Copy link to clipboard
Copied
Rats. The [none] (no-color) swatch is stubborn.
I was able to remove the [registration] swatch from the mix by making sure it's at the head of the palette and adding a (If swatchIndex>1) test to the script. But I can't get rid of the [none] swatch no matter what I do. Illustrator must treat it as a special case so that it cannot be referred to by index number.
Help, James!
One other thing: Not for nothing, but...
lets say I have 600 different objects in illustrator (just little circles with a fill color, no stroke) and 6 different colors that these circles should be. That means, I'd like about a 100 to be one color, 100 another color, etc.
...is not exactly the same thing as...
select all 600 and just tell Illustrator that I have these 6 colors and I want to apply them to the selected objects randomly
What you want is a uniform distribution of those six colors but in no discernible pattern. That's not true random assignment, and this script won't get you there even if got the unwanted swatches out of the mix.
No obvious solution here.
Copy link to clipboard
Copied
OK. Got it. Had to modify the script a bit more.
As I wrote in the previous post, this is done with a random number generator, and that's not exactly what you want. But if you want to play with the script, here is the modified version:
http://harron.home.acedsl.com/Misc/HKA_RandomSwatchFIll.zip
Make sure you make the undeletable swatches -- [none] and [registration] -- the first two in the palette/panel.
Copy link to clipboard
Copied
That's exactly what I needed! Thank you so so so much. This came just in time... I have a deadline that I wanted to use that for in like 15 minutes lol!
Copy link to clipboard
Copied
This link no longer works. Would you happen to have a working link for this script?
Copy link to clipboard
Copied
Please try the link again. I've put the file back up on the server.
Copy link to clipboard
Copied
Thanks so much!
Cheers,
Seb
Copy link to clipboard
Copied
And the link is dead again. Mind putting it back up?
Copy link to clipboard
Copied
Harron, you are the MAN! 😄
I wanted to point out that this does not work with compound shapes. Is there a work around, or am I doing something wrong?
Also, do you have a paypal I can donate to?
Copy link to clipboard
Copied
Glad this is useful, Div.
Unfortunately, compound path items are handled separately in scripting. There is no simple fill command, so subpaths would have to be individually addressed. Then, you'd have to decide how the individual path items within a compound shape (including knockouts) would be handled.
Not saying it can't be done... just that now we're going considerably beyond the original intent of this simple script. And I'm not sufficiently facile with scripting to whip off a solution. I can't think of anything other than the tedious process of busting up compound paths (e.g. with the pathfinder) to get around this limitation.
I appreciate the offer to donate, but that's unnecessary.
Copy link to clipboard
Copied
Hi
Sorry if im reviving an old thread.
This script was perfect for what I needed apart from the fact that grouped objects are left black (even if black is not in the pallette) is there a work around for that? I am using text converted to outlines and need to group the words or sentences together so they are in the same colour
Thanks
N
Copy link to clipboard
Copied
you could have a row of boxes, and then randomize color within them, select same color, and then apply that color to the row of text next to them. Not sure if they are arranged in a column, maybe just go item by item.
Copy link to clipboard
Copied
Can you please put the script back on the link?
Copy link to clipboard
Copied
OK. It's back. URL remains the same.
Copy link to clipboard
Copied
Harron.
Copy link to clipboard
Copied
Jacob.
Copy link to clipboard
Copied
You were missed over here the other day, Harron.
http://forums.adobe.com/message/4034311#4034311
And the other days.
Copy link to clipboard
Copied
Thanks, Harron!!
Copy link to clipboard
Copied
Hello people. I've been using HKA_randomSwathFill with Illustrator CC 2014 and loving it. It's amazingly useful for the work that I do. But with the CC 2105 update it no longer works. Has anyone seen an updated version of this script that will work with CC 2015? I need to find one right away. Thank you, thank you!
Copy link to clipboard
Copied
I agree! This is really useful somewhere. It should be built into illustrator.
Copy link to clipboard
Copied
Good old thread .
I'm using windows 7 and illustrator 2015.0.1
From the suggestions here, I've managed to get two random colour fill scripts to work.
First the one posted by Harron K in the 'correct answer' post, which seems to work
by selecting randomly from everything in the main swatches panel.
While this one, maybe it's just a different version ? (from Vector Boom website) only uses swatches you have selected.
Random Swatches Fill – Free Scripts for Adobe Illustrator - Freebies - Vectorboom
If I've messed up posting the link, please Google:
Vector boom Free Illustrator Script - Random Swatches Fill
Copy link to clipboard
Copied
An other script do the same, but based on a selected Swatches Group:
CSscripts/illustrator/randomizeColors at master · davidderaedt/CSscripts · GitHub
Hope that can help!