svg-sprite / gulp-svg-sprite

SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
648 stars 43 forks source link

Fill/Stroke colors #81

Closed MarcSa closed 6 years ago

MarcSa commented 6 years ago

Hello, First of all thank you for your program.

When I run your program to generate a new sprite, this modifies softly the original colors, is there a parameter to avoid changing the color however slight it is in the new sprite?

The modified colors are:

B2EEFF -> # ACD2E5

2B99BF -> # 2F8FB1

24A7C5 -> # 2A9BB6

assets.zip renderizedsprite.zip

Thanks for your help

jkphl commented 6 years ago

@MarcSa svg-sprite itself doesn't modify the SVG source files in any way (except what's necessary for compiling a sprite). I suspect this might be because of a particular SVGO plugin (no idea which one). Please start by disabling SVGO altogether to find out if it's the reason, then try disabling single plugins and let me know if you succeed. Thanks.

MarcSa commented 6 years ago

@jkphl, Hi, I've just modified svgo.js from node_modules/svg-sprite/lib/svg-sprite/transform/svgo.js

image

and gulpfile.js with the online configurator

image

is it the correct way? Thanks.

MarcSa commented 6 years ago

@jkphl Sorry my mistake, just works perfect, thanks for all!