Highlighted

Apply Random Color to Group of Objects

New Here ,
Jun 18, 2009

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.

RandomSwatchFill.gif

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.

Views

61.8K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Apply Random Color to Group of Objects

New Here ,
Jun 18, 2009

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.

RandomSwatchFill.gif

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.

Views

61.8K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 18, 2009 0
Guide ,
Jun 18, 2009

Copy link to clipboard

Copied

You might check out the JET_RandomFillSwatches script in this collection by James Talmage.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2009 1
New Here ,
Jun 18, 2009

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2009 0
Guide ,
Jun 18, 2009

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2009 0
Guide ,
Jun 18, 2009

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2009 1
Guide ,
Jun 18, 2009

Copy link to clipboard

Copied

OK. Got it. Had to modify the script a bit more.

RandomSwatchFill.gif

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2009 2
New Here ,
Jun 18, 2009

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2009 0
Participant ,
Aug 09, 2010

Copy link to clipboard

Copied

This link no longer works. Would you happen to have a working link for this script?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 09, 2010 0
Guide ,
Aug 10, 2010

Copy link to clipboard

Copied

Please try the link again. I've put the file back up on the server.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 10, 2010 0
Participant ,
Aug 10, 2010

Copy link to clipboard

Copied

Thanks so much!

Cheers,

Seb

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 10, 2010 0
Explorer ,
Nov 07, 2011

Copy link to clipboard

Copied

And the link is dead again. Mind putting it back up?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 07, 2011 0
Community Beginner ,
Aug 06, 2012

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2012 0
Guide ,
Aug 07, 2012

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 07, 2012 0
New Here ,
Dec 12, 2013

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 12, 2013 0
New Here ,
Oct 13, 2014

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2014 0
New Here ,
Nov 24, 2011

Copy link to clipboard

Copied

Can you please put the script back on the link?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 24, 2011 0
Guide ,
Nov 25, 2011

Copy link to clipboard

Copied

OK. It's back. URL remains the same.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 25, 2011 1
Most Valuable Participant ,
Nov 25, 2011

Copy link to clipboard

Copied

Harron.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 25, 2011 0
Guide ,
Nov 25, 2011

Copy link to clipboard

Copied

Jacob.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 25, 2011 0
Most Valuable Participant ,
Nov 26, 2011

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 26, 2011 0
Explorer ,
Nov 29, 2011

Copy link to clipboard

Copied

Thanks, Harron!!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 29, 2011 0
Community Beginner ,
Jun 23, 2015

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 23, 2015 0
Community Beginner ,
Jul 19, 2015

Copy link to clipboard

Copied

I agree! This is really useful somewhere. It should be built into illustrator.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 19, 2015 1
Guide ,
Jul 20, 2015

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

If I've messed up posting  the link, please Google:

Vector boom Free Illustrator Script - Random Swatches Fill

02.jpeg

 

03.jpeg

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 20, 2015 0
Adobe Employee ,
Sep 17, 2015

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2015 1
Community Beginner ,
Nov 10, 2019

Copy link to clipboard

Copied

Hi, i know its old thread, but is there similiar script like this but for photoshop?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 10, 2019 0
Explorer ,
Oct 12, 2020

Copy link to clipboard

Copied

I've made a script that can do this as well:

 

https://randomill.com/illustrator-random-color-script/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 12, 2020 0
Most Valuable Participant ,
Nov 10, 2019

Copy link to clipboard

Copied

blasta,

 

I would suggest your trying over here,

 

https://community.adobe.com/t5/Photoshop/bd-p/photoshop

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 10, 2019 0