problem with import - color change

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Heliooos
Posts: 11
Joined: Tue Dec 23, 2008 4:34 pm

problem with import - color change

Postby Heliooos » Mon Dec 29, 2008 11:48 pm

Hi,
I wanted to use some cliparts from OCAL and combine them. Using Inkscape 0.46 on Win XP Pro, I opened copy of the first one red and tried to import the second one - green. Imported image was surprisingly also red. Problem is, that I always get the same color as the original image.
The same is with other colors, when the source button is blue, than imported button is also blue ...
I used these buttons as source:
http://www.clker.com/search/button+pill/1

I never had this problem before so I do not know, what is wrong.

Any advice?

Thanks

Image

Image

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: problem with import - color change

Postby Simarilius » Tue Dec 30, 2008 3:30 am

gonna guess there's a clash on gradient names with the imported doc.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: problem with import - color change

Postby prkos » Tue Dec 30, 2008 3:41 am

I'd also say it's a gradient name clash. Import one drawing, select the object that changed color and duplicate the gradient in the Fill and Stroke dialogue (it will be the same gradient but with a different name). Import the other drawing, if the first one changes color select the object in question and change the gradient to the duplicated one.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
Heliooos
Posts: 11
Joined: Tue Dec 23, 2008 4:34 pm

Re: problem with import - color change

Postby Heliooos » Tue Dec 30, 2008 4:22 pm

Thanks,
I came to the same idea (that the cause is in gradient names) too ( while I was on the toilet :D ), but thanks for advice and a solution. ;)

It is a pity that it is not possible to rename the gradients like in OOo to prevent this and to arrange them better.

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: problem with import - color change

Postby kelan » Wed Dec 31, 2008 1:02 am

It is possible to rename gradients using the XML editor. You can find the gradient definitions under the svg:defs element. Simply change their id attribute. You'll also need to update the objects that use any gradient you rename, since the object will be referring to the old name. You can find an object's gradient reference in its style attribute.

However, this will probably be unnecessary in the future, because I believe they've added code to the dev version of Inkscape to check for id clashes when importing an SVG or pasting one in from the clipboard.

User avatar
aho
Posts: 180
Joined: Sun Nov 04, 2007 9:51 am
Contact:

Re: problem with import - color change

Postby aho » Wed Dec 31, 2008 4:48 am

Gradient conflicts are automatically solved in 0.47.

Well, there is a trick to rename all gradients quickly:

Effects->Color->Custom...
Red function: r
Green function: g
Blue function: b

Effectively this doesn't change anything, but new ids for all gradients are generated anyways.


Return to “Help with using Inkscape”