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!
You might check out the JET_RandomFillSwatches script in this collection by James Talmage.
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.
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.
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.
You were missed over here the other day, Harron.
http://forums.adobe.com/message/4034311#4034311
And the other days.
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.
North America
Europe, Middle East and Africa
Asia Pacific