Hello.
I'm importing some small png icons to use in inkscape.
These are black and white antialiased images with transparency.
I would like to change their color to match a given named color.
Red instead of black for example.
Is the any way to do this?
Thanks
Change png icon color
Re: Change png icon color
Inkscape is for working with vectors. If you want to edit a PNG, you want to use something like GIMP instead. You will be able to convert Black to Red very easily in GIMP.
Re: Change png icon color
Yes. I know I can change the bitmap itself.
In this case I use quite a few icons in a site mockup and would like to try different icon colors.
It seams this can be done with filters (color matrix maybe).
Is there a why to create a filter that would colorize a bitmap in a simpler way?
Preferably using a named color as parameter?
Thanks
In this case I use quite a few icons in a site mockup and would like to try different icon colors.
It seams this can be done with filters (color matrix maybe).
Is there a why to create a filter that would colorize a bitmap in a simpler way?
Preferably using a named color as parameter?
Thanks
Re: Change png icon color
you can use raster graphics as part of whatever work in inkscape but it was not designed to manipulate these other than sizing, moving, or filtering etc as part of an inkscape composition. inkscape is first and foremost for vector work. If your icons don't have a whole lot of intricate detail you could also trace in inkscape, which will convert to vector...but this is not the simplest of things to do right.
Re: Change png icon color
You could create your own custom filters for this, and set them up with named colors in their name or title, if you like. But learning how to create a new filter from scratch has proven exceedingly difficult for me. So I couldn't tell you how. I have found it easier to tweak existing filters, but that took several hours of studying the manual and experimenting. It does look like the Color Matrix primitive is used exclusively in many, if not all Filters menu > Color filters. The Color Matrix totally makes no sense to me though, so again, I couldn't help.
Oh! Well another way to add color using a filter, is the Flood primitive. But that would fill the icon with a single color, not for example, the background of the icon, or foreground, or whatever. I assume the icons are all different. Are they a single closed shape, say like the 4 suits in a deck of cards? If that's the case, the Flood primitive might be the ticket. But going from Flood primitive to filter, I couldn't say exactly how.
Another member and I have taken up the task of learning how to create a filter from scratch, and then writing a tutorial in simple language, once we figure it out. But who knows how long that will take, lol!
Oh! Well another way to add color using a filter, is the Flood primitive. But that would fill the icon with a single color, not for example, the background of the icon, or foreground, or whatever. I assume the icons are all different. Are they a single closed shape, say like the 4 suits in a deck of cards? If that's the case, the Flood primitive might be the ticket. But going from Flood primitive to filter, I couldn't say exactly how.
Another member and I have taken up the task of learning how to create a filter from scratch, and then writing a tutorial in simple language, once we figure it out. But who knows how long that will take, lol!
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Change png icon color
Icons are just bitmaps with transparency.
I was just wondering if there was any already available filters for this task.
I'll browse to see if there are any filters already available and ultimately try to create some kind of rgb multiply filter (and invert option since in the case I want to colorize black pixels)
Don't know If I'll manage to do it dough. It seams quite complicated...
Thanks anyway.
I was just wondering if there was any already available filters for this task.
I'll browse to see if there are any filters already available and ultimately try to create some kind of rgb multiply filter (and invert option since in the case I want to colorize black pixels)
Don't know If I'll manage to do it dough. It seams quite complicated...
Thanks anyway.
Re: Change png icon color
Yeah, the bottom line is that there are no pre-exising filters that will do exactly what you want. You may find some that you can tweak. But otherwise you'd have to make your own.
But short of doing that, I'm wondering if you couldn't just take a screenshot of your web layout in Inkscape. Then use GIMP (or other raster editor) to try different colors. Once you find the colors you want for each icon, change it in the raster editor, then import back to Inkscape. Would that work?
But short of doing that, I'm wondering if you couldn't just take a screenshot of your web layout in Inkscape. Then use GIMP (or other raster editor) to try different colors. Once you find the colors you want for each icon, change it in the raster editor, then import back to Inkscape. Would that work?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Change png icon color
as long as things remain non-complicated....import the black and transparency png, select this object, from menu Filters > Color > colorize. from menu choose Filters > filter editor. in the filter editor dialog select the Color Matrix effect if not already selected, near the bottom of the filter editor dialog in Effect Parameters change Type from default Saturate to Matrix. all the black has now become red by default. to change the color select the Flood component of the filter (the effect) and near the bottom of the filter editor dialog you can change flood color in the usual color picker.
Re: Change png icon color
This method is a bit of a cheat. additionally it works best when used with an image that actually has NO transparency, that is, the transparent areas are all converted to opaque white. You can do this in GIMP or some other program by flattening the image or saving it in a format that does not allow transparency. Once you do all the preliminaries, though, the color is super easy to change, especially in the xml file, without even opening it in Inkscape.
Downside: Masks are not always rendered correctly in other programs even though they are SVG compliant. Sad fact.
Also, I know it's not a vey impressive example of an icon,
AAAARGH! I accidentally made the graphic say 'clip' instead of 'mask'
Later: I've corrected it - sloppily - because I had already deleted the file.
Downside: Masks are not always rendered correctly in other programs even though they are SVG compliant. Sad fact.
Also, I know it's not a vey impressive example of an icon,
AAAARGH! I accidentally made the graphic say 'clip' instead of 'mask'
Later: I've corrected it - sloppily - because I had already deleted the file.
Your mind is what you think it is.
Re: Change png icon color
Hi.
Thanks a lot for the ideas.
I finished the mockup but now I have a starting point to investigate this further.
Using named color is really an advantage. Could the colorize filter use a named color?
Thanks again.
Thanks a lot for the ideas.
I finished the mockup but now I have a starting point to investigate this further.
Using named color is really an advantage. Could the colorize filter use a named color?
Thanks again.
Re: Change png icon color
Actually I've just started to look into filters a little more intensely than before, and I think I know what you can do. Give me a couple hours, or maybe couple of days, lol. I'll make you a tutorial for making a custom filter. Within the filter, you will have to use hexcode, rgb, or dropper tool to set the color. But you could name the filter by the name of the color -- like blue filter, red filter, etc.
I'm not positive that I will be able to do this, but I think I can. And as soon as I get it figured out, I'll give you instructions
I'm not positive that I will be able to do this, but I think I can. And as soon as I get it figured out, I'll give you instructions
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design