TG Telegram Group & Channel
GeekTips | United States America (US)
Create: Update:

Say you wanted to invert hex colors so the stroke color is inverted of the fill color. Ultimately I decided against this and just going to use black for stroke. To do so using sed transliterate sed -e 'y/0123456789abcdef/fedcba9876543210/' you can't search for a pattern. So perl works in this case.

for f in *.svg ; do perl -p -i -e 's{(stroke="#[\w{6}])}{ ($new=$1) =~ tr/0123456789ABCDE/EDCBA9876543210/; $new }eg' "$f" ; done

Say you wanted to invert hex colors so the stroke color is inverted of the fill color. Ultimately I decided against this and just going to use black for stroke. To do so using sed transliterate sed -e 'y/0123456789abcdef/fedcba9876543210/' you can't search for a pattern. So perl works in this case.

for f in *.svg ; do perl -p -i -e 's{(stroke="#[\w{6}])}{ ($new=$1) =~ tr/0123456789ABCDE/EDCBA9876543210/; $new }eg' "$f" ; done


>>Click here to continue<<

GeekTips






Share with your best friend
VIEW MORE

United States America Popular Telegram Group (US)