Created
November 28, 2017 16:48
-
-
Save ekaitz-zarraga/ff56822b5370699aa5dddcb5d7893254 to your computer and use it in GitHub Desktop.
Convert Maki Icons to PNG in different colors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# LICENSE: | |
# Copyright © 2017 Ekaitz Zárraga <[email protected]> | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See the COPYING file for more details. | |
# Convert certain icons from Mapbox Maki icons to PNGs in different colors | |
# Uses: svgexport | |
# https://github.com/shakiba/svgexport | |
files=" | |
dam-15.svg | |
mountain-15.svg | |
airfield-15.svg | |
airport-15.svg | |
heliport-15.svg | |
harbor-15.svg | |
industry-15.svg | |
ranger-station-15.svg | |
fuel-15.svg | |
embassy-15.svg | |
castle-15.svg | |
fence-15.svg | |
city-15.svg" | |
colors=" | |
red | |
blue | |
green | |
black | |
white | |
yellow | |
orange | |
purple | |
crimson | |
grey | |
lime | |
cyan | |
" | |
for color in $colors; do | |
for f in $files; do | |
svgexport $f "${f%%-15.svg}-${color}.png" output size 30:30 styles "svg{fill: ${color}}" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment