Skip to content

Instantly share code, notes, and snippets.

@rnystrom
Last active December 22, 2015 22:39
Show Gist options
  • Select an option

  • Save rnystrom/6541563 to your computer and use it in GitHub Desktop.

Select an option

Save rnystrom/6541563 to your computer and use it in GitHub Desktop.
Overlay a directory of PNGs with a solid color. You'll have to escape quotes (any solution to this?).
#!/bin/bash
# ex:
# coloroverlay black
# coloroverlay 'rgba\\(0,0,0,0.5\\)'
COLOR=$1
ls *.png | awk '{print("convert "$1" \\( -clone 0 -fill '$COLOR' -draw \"color 0,0 reset\" \\) -compose atop -composite "$1)}' | /bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment