Internet Bandaid   [RSS Feed]

Archive for January 20th, 2012

Negate icon colors with ImageMagick/Linux

without comments

Someone else wrote this, but it’s so awesome i have to save it here

Batch convert icons to white (Linux)

in jQuery Mobile •  15 days ago
I just thought I’d share this conversion method that I came up with using ImageMagick. Change to the directory containing your icons and then run this.
Copy code
  1. mkdir white;
  2. ls | grep -iE png$ | xargs -i convert {} -negate -level 0,0,0 white/{};
ls | grep -iE png$ finds all png extensions
xargs -i replaces all occurrences of {} with each image name
negate inverts the colours
The icons are originally around #444 so inversion then requires a level shift to move them to #fff instead of #aaa;

Written by John Lai

January 20th, 2012 at 7:11 pm

Posted in Uncategorized