5

I am working on a project where i need to draw several trees and plethora of leaves of multiple colors.

As it is a time consuming approach so i set an action where the action is set to change stroke into fill. Workflow was fine as long as stroke color were same.

But as am mixing several color leaf this action is not working anymore. Manually i have to change each stroke into fill.

And if i apply magic wand some other portion of trees get selected.

Why the action is not working for multiple color strokes?? enter image description here

6

Perhaps try a different approach. You could create multiple coloured leaves using a script to randomly fill with some chosen colour swatches.

There's a free Random Swatches Fill script here. I have no connection with the website or the script developer.

I tested the script in CC 2018 and it still works. However to use it in CC versions you will need to change the file extension from .js to .jsx, and put it in your Illustrator Scripts folder.

  1. Draw a bunch of leaves. If you drew them with a brush like I did, select them all and click Object > Expand Appearance, so that they are just filled shapes. Make sure they are all ungrouped

  2. Select all

  3. In the Swatches panel, make sure to activate the Fill option, then hold down Ctrl/Command and make a multiple selection of all the swatches you want to use.

  4. click File > Scripts > RandomSwatchesFill

enter image description here

In case the link above ever rots, here's an additional link to what appears to be the origin of the script. https://github.com/robotwood/Random-Swatch-Fill

|improve this answer|||||
  • wow.... its so cool... didnt know... Thank you. – Suraiya Abedin Feb 28 at 7:06
  • It's unclear to me the license that the code was intended on being released under - my gut says it's not CC-BY-SA 4.0, and so (IMO) would not suitable for inclusion on the site. – Tyzoid Feb 28 at 18:51
  • @Tyzoid According to google, the first appearance of the file on the web seems to be here github.com/robotwood/Random-Swatch-Fill - the readme makes no mention of a licence. – Billy Kerr Feb 28 at 19:11
  • 1
    @Tyzoid I only included the script because of link rot but since you've objected I'm removing it, and instead I'm posting a link to what appears to be the original file on github. – Billy Kerr Feb 28 at 19:21
  • @BillyKerr Generally, what I do in the case I'm worries about link rot, is to throw the content in through the WayBack machine and to trigger a manual archive. – Tyzoid Feb 28 at 23:05
3

I don't have a direct answer to your question, but I have an idea for an action that will save some time.

The following may work...

  1. Organize your leaves into a single layer.
  2. Select the TOP object.
  3. Create a new action with two steps.
    • Swap fill-stroke ( Shift+X )
    • Select the object below ( Ctrl+Alt+[ )
  4. Play the action until you've swapped the fill and stroke for every leaf.

enter image description here (in the video, the mouse is hovering over the stop button, but I'm using F3 to play the action)

|improve this answer|||||
  • wow.... top object matters here. remembering that in my case is difficult. but i love this approach. – Suraiya Abedin Feb 28 at 7:09
  • This is a brilliant workaround! I thought for some time on this, but this is pretty neat. – WELZ Feb 28 at 13:26
  • @WELZ, thx for the kind words and adding those cool stylized key icons. SuraiyaAbedin, glad this is an approach you love. – CuriousChad Feb 28 at 21:16
2

In order for the Shift-X shortcut to work in inverting fills/strokes the fill and stroke color has to be the same for everything selected. It simply doesn't work with selections of multiple, different colored, objects.

And there is no universal "toggle fill and stroke colors" option which I am aware of, especially if the colors continually vary.

It may be easier to perhaps to set all the strokes the same color, then use Live Paint to add fills easily, while changing colors as desired. Then, simply remove all the strokes.

|improve this answer|||||
  • am not familiar with live paint... nvr used.. but now i see i have to get acquainted with it. Thank you for teaching me this. – Suraiya Abedin Feb 28 at 7:13
2

You can speed this up if you have some objects in the same fill/stroke combo:

  • Select one of these objects
  • Go to Select → Same → Fill & Stroke
  • Hit Shift+X
|improve this answer|||||
  • Thank you ,i didn't know about this feature. – Suraiya Abedin Feb 28 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.