sketch-hq / svgo-compressor

A Plugin that compresses SVG assets using SVGO, right when you export them.
https://www.sketch.com/extensions/plugins/svgo-compressor/
MIT License
1.1k stars 50 forks source link

Feature request: find and replace value #69

Open mesqueeb opened 4 years ago

mesqueeb commented 4 years ago

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

What do you think? : D

jeffdaley commented 3 years ago

@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.

jdahdah commented 2 years ago

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"
  }
},