svgo-compressor icon indicating copy to clipboard operation
svgo-compressor copied to clipboard

Feature request: find and replace value

Open mesqueeb opened this issue 5 years ago • 2 comments

I would love a certain colour in my sketch made icons to be replaced by currentColor on export!

What do you think? : D

mesqueeb avatar Jul 05 '20 07:07 mesqueeb

@mesqueeb You can add a currentColor param to the convertColors plugin:

    {
      "name": "convertColors",
      "enabled": true,
      "params": {
        "currentColor": true
      }
    }

But this will affect all colors rather than specific colors.

jeffdaley avatar Nov 25 '20 16:11 jeffdaley

FYI, if you want to replace a certain color, place that one in there instead of currentColor: true. So if you wanted to replace black (#000000), it would be:

{
  "name": "convertColors",
  "enabled": true,
  "params": {
    "currentColor": "#000000"
  }
},

jdahdah avatar Nov 04 '21 13:11 jdahdah