Replace colour range


/ Published in: Bash
Save to your folder(s)

This snippet shows how to replace the colours in a monochrome image, i.e. one which only contains two colours and the range of hues between them.


Copy this code and paste it in your HTML
  1. # Converting white on blue to black on beige:
  2. convert source.png -level-colors white,\#200070 +level-colors black,\#FFF8E0 dest.png
  3. # Converting white on blue to black on white:
  4. convert source.png -level-colors white,\#200070 dest.png
  5. # Converting black on white to white on blue:
  6. convert source.png +level-colors white,\#200070 dest.png

URL: http://www.imagemagick.org/Usage/color/#level-colors

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.