I'm working on the image here:
viewtopic.php?f=9&t=959
It uses three colors. I'd like to quickly change the three colors to try out different combinations. To achieve the effect, I have, say, the mauve on the lowest later, then details of it on the highest layer, with the bubblegum pink swirls between. This creates a nice contrast of pink swirl on mauve background.
When I select all the mauve objects and union them, the depth is destroyed.
How can I select all instances of one color simultaneously while preserving their depth in the layer hierarchy? Alternatively, how can I group them only by what is visible (like the magic wand in photoshop would do, for example, or Select > color range?
Thanks!
[solved] Selecting the same color across the image
-
- Posts: 15
- Joined: Thu Apr 24, 2008 3:39 am
Re: Selecting the same color across the image
Under the effects menu you'll find colour > replace colour, which I think will do the job.
However, I prefer to use gradients for all colouring because they can be reused across multiple objects. To use this method in 0.46 you need to go to the Inkscape Preferences and under Misc, untick "Prevent sharing of gradient definitions". You can then use the same gradient on multiple objects and only have to edit the gradient once to have all objects change.
If you go into the XML editor you can even delete the extra gradient stops so you only work with the one stop to keep a flat colour.
However, I prefer to use gradients for all colouring because they can be reused across multiple objects. To use this method in 0.46 you need to go to the Inkscape Preferences and under Misc, untick "Prevent sharing of gradient definitions". You can then use the same gradient on multiple objects and only have to edit the gradient once to have all objects change.
If you go into the XML editor you can even delete the extra gradient stops so you only work with the one stop to keep a flat colour.
-
- Posts: 15
- Joined: Thu Apr 24, 2008 3:39 am
Re: Selecting the same color across the image
That's a cool tip. I will investigate it on my next project.
-
- Posts: 15
- Joined: Thu Apr 24, 2008 3:39 am
Re: Selecting the same color across the image
replace color worked great. It took a long time to figure out though. Inkscape uses the rgb and a transparency value, so solid white is ffffff plus ff. Replace color uses only the first six characters.
Re: Selecting the same color across the image
The reason for that is a discrepancy between the SVG spec and the way Inkscape presents color values. In the Fill and Stroke dialog, Inkscape does present Alpha right along the RGB, and even smooshes them altogether in one string of characters in the lower right corner. However, in the actual XML, the alpha values for fill and stroke are stored separately from the RGB values for a given object. Thus it was easier for the writer of the Replace Color script to work on just the RGB because that's how it's stored in the XML.