Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/unic/gulp-colorize-svgs

Gulp plugin to create color variants of SVGs and add them to the stream
https://github.com/unic/gulp-colorize-svgs

Last synced: about 2 months ago
JSON representation

Gulp plugin to create color variants of SVGs and add them to the stream

Awesome Lists containing this project

README

        

# gulp-colorize-svgs

Replaces the ```fill``` attribute value of an SVG with one or several predefined colors and adds the new files to the stream. The original file is removed from the stream.

If no colors were specified, the original files are passed through.

**Word of caution**: If an SVG does not have a ```fill``` attribute (which seems to be the case for black icons exported from Illustrator), the default ```option.replaceColor``` function won't find anything to replace and should be adapted accordingly (e.g. ```return content.replace(/