Replacing Colours

Post questions on how to use or achieve an effect in Inkscape.
atramentous
Posts: 7
Joined: Sat Aug 01, 2015 7:13 am

Replacing Colours

Postby atramentous » Mon Aug 03, 2015 9:55 am

I have imported a PNG file with a transparent background that has a single, solid black shape. I cannot figure out how to replace the black with another colour. I have gone to Extensions-->Color-->Replace color and tried to replace 000000 with other hex values and, while the dialog says "Replace color is working" there is no change to the image.

Similarly, I would like to be able to outline this image and maybe delete or make the interior transparent.

Advice is appreciated.

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Replacing Colours

Postby Espermaschine » Mon Aug 03, 2015 11:05 am

I'd say, wrong tool for the job.
What you have is a raster image.

Inkscape is a vector program.

Try Gimp, and check out this tutorial:

http://gimpforums.com/thread-background ... -and-logos

atramentous
Posts: 7
Joined: Sat Aug 01, 2015 7:13 am

Re: Replacing Colours

Postby atramentous » Mon Aug 03, 2015 11:33 am

Many thanks. It did seem like others had solved this problem in Inkscape but, of course, I couldn't replicate the apparent solutions.

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Replacing Colours

Postby Espermaschine » Mon Aug 03, 2015 11:44 am

atramentous wrote:Many thanks. It did seem like others had solved this problem in Inkscape but, of course, I couldn't replicate the apparent solutions.

Without seeing your image its always hard to tell.

You could trace the image or recreate the object with a path, but i wouldnt recommend it.

Can you post the image ?

atramentous
Posts: 7
Joined: Sat Aug 01, 2015 7:13 am

Re: Replacing Colours

Postby atramentous » Mon Aug 03, 2015 11:54 am

Here it is.
Attachments
toronto_skyline_black.png
toronto_skyline_black.png (59.43 KiB) Viewed 3217 times

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Replacing Colours

Postby Espermaschine » Mon Aug 03, 2015 12:15 pm

What colourchange do you want ?

EDIT: you can trace that image easily in Inkscape.
Select the image, go to Path - > Trace Bitmap... -> Brightness Cutoff
The traced image will be on top of your original.
Select the traced image and click on any colour you like, to change it.

For a mini-tutorial look here:
http://goinkscape.com/how-to-trace-a-photo-in-inkscape/


Its also easy in Gimp. Just lock the alpha-channel and drag the colour you want on your layer.
Last edited by Espermaschine on Mon Aug 03, 2015 12:24 pm, edited 2 times in total.

atramentous
Posts: 7
Joined: Sat Aug 01, 2015 7:13 am

Re: Replacing Colours

Postby atramentous » Mon Aug 03, 2015 12:22 pm

I'm not sure. :-) I was thinking of combining this shape, in some fashion, with another image -- either as a translucent colour, an outline, or some kind of a mask. I was just trying to play around with those options when I ran into the issue of trying to substitute colours.

I am familiar with Gimp and I could produce all of these options in that program. That just seems really tedious and I just assumed that Inkscape ought to be able to do something similar. It seems I was able to do all of these things in Adobe Illustrator and I assumed Inkscape would have equivalent functionality.

User avatar
Espermaschine
Posts: 892
Joined: Thu Jun 05, 2014 9:10 pm

Re: Replacing Colours

Postby Espermaschine » Mon Aug 03, 2015 12:24 pm

See my edit in the previous post.

atramentous
Posts: 7
Joined: Sat Aug 01, 2015 7:13 am

Re: Replacing Colours

Postby atramentous » Mon Aug 03, 2015 12:26 pm

Many thanks.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Replacing Colours

Postby druban » Mon Aug 03, 2015 3:07 pm

The bucket tool will do this in one click...

Edit: But your image is of such low quality, with blurry anti-aliased edges where they weren't necessary, it will take many clicks with the bucket, and an union at the end to join them all to accomplish this. If it had been a high contrast 1bit image it would have been a snap.

Hint: This kind of image is particularly easy to trace by hand with vastly superior results to any automated procedure such as we have offered here and a very low node count as well.
toronto.svg
(78.49 KiB) Downloaded 173 times
Your mind is what you think it is.

atramentous
Posts: 7
Joined: Sat Aug 01, 2015 7:13 am

Re: Replacing Colours

Postby atramentous » Mon Aug 03, 2015 11:48 pm

Many thanks again. :)

atramentous
Posts: 7
Joined: Sat Aug 01, 2015 7:13 am

Re: Replacing Colours

Postby atramentous » Tue Aug 04, 2015 2:14 am

Did you use Gimp for the colour replacement in the attachment? My new thought is to use the skyline silhouette as a mask but my understanding is that I must be able to convert it to a uniform grey scale first.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Replacing Colours

Postby druban » Tue Aug 04, 2015 3:24 pm

No, it was done by clicking with the bucket tool in Inkscape.
Masked works too, but you have to invert the image first. This can be done in inkscape (negate).
You can release the mask in attached file to see what it looks like.
masked.svg
(8.78 KiB) Downloaded 210 times
Your mind is what you think it is.


Return to “Help with using Inkscape”