How to change colour of all elements of a group, at once, in Illustrator
I have a group of objects of the same colour, consisting of compound paths, regular paths and groups of these. How to change the colour of all objects at once? When I tried to use colour picker or change it through color palette the colour remained the same but the graphics was rendered with a very tiny outline of the new colour, which I guess is not printable. Usually I had to change the colour of all objects individually.
I'm sorry if I was not too precise. I mean to apply new colour / swatch to all member objects of the group at once, not to change properties of a commonly shared swatch.
I received very useful answers, however my goal was to pick a colour from another object, serving as a source. When I tried to select all objects, for example with ctrl-a, and then use a eyedropper to pick up a desired colour, it didn't work for some objects in some groups. Please have a look at my answer where several methods are listed.
The problem of not being able to colour all objects after 'traditional' 'select all' operation appears when the group has it's own appearance attribute (in appearance panel). It is because a group had applied a fill attribute to it, which was receiving all colour changes when whole group was selected, and this fill attribute was placed in Appearance pane BELOW the group contents. You can see in in the example below:
There are several ways of colouring all the objects at once:
- [Also suggested by @Lollero in the comment to his answer] Use the Direct Selection Tool (the white arrow) to select all the member objects and change the colour. If there is something below your group, double click it to enter the Isolation Mode and then do the selection. Works for groups with fill attribute above contents only if all objects are selected,
- Using appearance attributes. In case of my group I could see the fill colour in the Appearance Panel and I could change the fill colour, but it didn't change the colour of the sub-objects. I realised that there were three "layers/attributes" in this panel in the following order: 1. Stroke, 2. Contents, 3. Fill. What did help was to move Fill attribute above contents "layer/attribute". The other object I didn't have problems with didn't have those Stroke and Fill attributes (what was reflected in an empty circle next to it's name in Layers panel. My 'troublemaker' had this circle filled).
- Avoiding appearance attributes. What also helped was to remove the abovementioned appearance atrributes by pressing Clear Appearance button at the bottom of Appearance Panel, and then pick a colour from the source object while holding Shift key, or apply new colour or swatch directly. Picking colour with Eyedropper without holding shift will add appearance attributes to the group and move the Fill below contents.
- There is also @Scott's mentioned powerful technique of using "Recolor Artwork" function. Please see Scott's answer.
Use Live Color (Recolor Artwork) if you have Illustrator CS4 or newer.
Select all the objects, then choose Edit > Edit Color > Recolor Artwork.
With the Assign Tab highlighted, select 1 under the color menu at the top center of the window.
Double-click the little color box on the right and set a new color.