Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/unic/gulp-colorize-svgs
- Owner: unic
- Created: 2015-04-11T19:18:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-26T13:29:06.000Z (over 7 years ago)
- Last Synced: 2024-04-14T05:50:41.281Z (9 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 3
- Watchers: 23
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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(/