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

Apply Random Color to Group of Objects

New Here ,
Jun 18, 2009 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!

Views

69.6K

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
community guidelines

correct answers 1 Correct answer

Guide , Jun 18, 2009 Jun 18, 2009

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.

Votes

Translate

Translate
Adobe
Guide ,
Jun 18, 2009 Jun 18, 2009

Copy link to clipboard

Copied

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

Votes

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
community guidelines
New Here ,
Jun 18, 2009 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!

Votes

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
community guidelines
Guide ,
Jun 18, 2009 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.

Votes

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
community guidelines
Guide ,
Jun 18, 2009 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.

Votes

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
community guidelines
Guide ,
Jun 18, 2009 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.

Votes

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
community guidelines
New Here ,
Jun 18, 2009 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!

Votes

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
community guidelines
Contributor ,
Aug 09, 2010 Aug 09, 2010

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Guide ,
Aug 10, 2010 Aug 10, 2010

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Contributor ,
Aug 10, 2010 Aug 10, 2010

Copy link to clipboard

Copied

Thanks so much!

Cheers,

Seb

Votes

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
community guidelines
Explorer ,
Nov 07, 2011 Nov 07, 2011

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Beginner ,
Aug 06, 2012 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?

Votes

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
community guidelines
Guide ,
Aug 07, 2012 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.

Votes

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
community guidelines
New Here ,
Dec 12, 2013 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

Votes

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
community guidelines
New Here ,
Oct 13, 2014 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.

Votes

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
community guidelines
Guest
Nov 24, 2011 Nov 24, 2011

Copy link to clipboard

Copied

Can you please put the script back on the link?

Votes

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
community guidelines
Guide ,
Nov 25, 2011 Nov 25, 2011

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Expert ,
Nov 25, 2011 Nov 25, 2011

Copy link to clipboard

Copied

Harron.

Votes

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
community guidelines
Guide ,
Nov 25, 2011 Nov 25, 2011

Copy link to clipboard

Copied

Jacob.

Votes

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
community guidelines
Community Expert ,
Nov 26, 2011 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.

Votes

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
community guidelines
Explorer ,
Nov 29, 2011 Nov 29, 2011

Copy link to clipboard

Copied

Thanks, Harron!!

Votes

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
community guidelines
Community Beginner ,
Jun 23, 2015 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!

Votes

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
community guidelines
Community Beginner ,
Jul 19, 2015 Jul 19, 2015

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Guide ,
Jul 20, 2015 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

Votes

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
community guidelines
Adobe Employee ,
Sep 17, 2015 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!

Votes

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
community guidelines