Hi all,
I have a logo .png file (only words) in red color with transparent background.
Is there a command line to change the color of the words from red to yellow? Please advise. Thanks
Regards
satimis
How to change logo color
Re: How to change logo color
Hi all,
Following command helps me out:
⟫ convert traces_of_life_10_en.png -fuzz 15% -fill yellow -opa
que "#c03030" traces_of_life_10_en_yellow.png
I found it on Internet
Could you please help me to understand;
-fuzz 15%
-opaque "#c03030"
?
Thanks
satimis
Following command helps me out:
⟫ convert traces_of_life_10_en.png -fuzz 15% -fill yellow -opa
que "#c03030" traces_of_life_10_en_yellow.png
I found it on Internet
Could you please help me to understand;
-fuzz 15%
-opaque "#c03030"
?
Thanks
satimis
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to change logo color
Documentation of the options is at http://www.imagemagick.org/script/comma ... ptions.php
"-opaque {colour}" means "change pixels that are currently {colour} to the fill colour".
If fuzz was zero, only pixels that were exactly {colour} would be changed. With a fuzz of 15%, all colours that were within 15% of {colour} are changed.
"-opaque {colour}" means "change pixels that are currently {colour} to the fill colour".
If fuzz was zero, only pixels that were exactly {colour} would be changed. With a fuzz of 15%, all colours that were within 15% of {colour} are changed.
snibgo's IM pages: im.snibgo.com
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: How to change logo color
Depending on your version of IM one or both of these should do what you describe...
Code: Select all
convert logo.png -fill yellow -colorize 100 logo_out.png
Code: Select all
convert logo.png ( +clone -fill yellow -colorize 100 ) +swap -compose copyopacity -composite logo_out.png
It's always best if you provide your version of IM and what platform you're working on.
Re: How to change logo color
Hi,GeeMack wrote: ↑2017-12-14T06:58:56-07:00Depending on your version of IM one or both of these should do what you describe...
Code: Select all
convert logo.png -fill yellow -colorize 100 logo_out.png
If you're on a *nix platform you'll have to escape those parentheses with backslashes like "\( ... \)".Code: Select all
convert logo.png ( +clone -fill yellow -colorize 100 ) +swap -compose copyopacity -composite logo_out.png
It's always best if you provide your version of IM and what platform you're working on.
Thanks for your advice.
I found following command on Internet;
Code: Select all
$ convert input_file.png -fuzz 15% -fill '#xxxx' -opaque "#c03030" output_file.png
I have another logo same as the first one with only words in green color and transparent background but;
Code: Select all
$ convert input_file.png -fuzz 15% -fill red -opaque "#c03030" output_file.png
Then I increased 15% to 80%. It worked changing the logo color to red.
I can't understand why I need to increase -fuzz?
Your recommended 2 command lines work for me but I prefer the first one. It is easy to remember.
$ convert --version
Code: Select all
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-07-31 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
Regards
satimis
Re: How to change logo color
Hi,snibgo wrote: ↑2017-12-14T06:31:04-07:00 Documentation of the options is at http://www.imagemagick.org/script/comma ... ptions.php
"-opaque {colour}" means "change pixels that are currently {colour} to the fill colour".
If fuzz was zero, only pixels that were exactly {colour} would be changed. With a fuzz of 15%, all colours that were within 15% of {colour} are changed.
Thanks for your advice and link.
"#c03030" is not the color of my logo. It was in the command line which I found on Internet. But without changing it the command line still worked? Why?"-opaque {colour}" means "change pixels that are currently {colour} to the fill colour".
Regards
satimis
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to change logo color
I guess, because your logo colour is within 15% of #c03030.
snibgo's IM pages: im.snibgo.com