mogrify替换颜色

所有非透明色都替换为新颜色:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
convert 1.png -fill '#COLOR' -colorize 100 1_out.png
convert 1.png -fill '#COLOR' -colorize 100 1_out.png
convert 1.png -fill '#COLOR' -colorize 100 1_out.png

 

根据颜色1替换为颜色2,25%差异容忍度

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
convert 1.jpg -fuzz 25% -fill "#COLOR1" -opaque "#COLOR2" -flatten 1_out.jpg
convert 1.jpg -fuzz 25% -fill "#COLOR1" -opaque "#COLOR2" -flatten 1_out.jpg
convert 1.jpg -fuzz 25% -fill "#COLOR1" -opaque "#COLOR2" -flatten 1_out.jpg

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *