Tint with ImageMagick

This is a bash script. To use it, create the file, use chmod +x tint, then run it with tint green (for example). You might have to adjust the fuzz factor.

#!/bin/bash
if [ $# -lt 1 ]
then
echo “Usage: tint color”
fi
d=’../box-1/’
for f in `ls $d`
do
convert $d$f -fill $1 -fuzz 4% -opaque “#eee” $f
done

d is the source directory, where the original images are stored. The directory this script is running in serves as the destination.