Posted By

deepsoul on 01/06/10


replace colour color imagemagick

Versions (?)

Replace colour range

 / Published in: Bash


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.

  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

Report this snippet  

You need to login to post a comment.