I want to create an svg button to be used in a WordPress plugin. Is there a way to make it compatible with a color picker to match each theme ? Maybe one file with different colors.

closed as off-topic by Danielillo, Luciano, Ovaryraptor, PieBie, Paolo Gibellini Sep 27 '18 at 13:28

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Hi MAGS94, welcome to GD.SE, you can change a simple svg button or image color using filters in the CSS. Do you have access to the CSS? What do you mean with "make it compatible with a color picker"? – Danielillo Sep 16 '18 at 9:20
  • A button is going to be used with a color picker so that it can be customized to any color within the plugin (think WordPress theme custom colors) – MAGS94 Sep 16 '18 at 9:25
  • Don't you think this is a question you should make to Wordpress or look for an answer in this special plugin help? This is a site for graphic design questions, not for Wordpress issues. – Danielillo Sep 16 '18 at 9:32
  • Maybe you are right but I think this is also related to svg structure. – MAGS94 Sep 16 '18 at 9:38
  • 1
    Ok, I repeat the first comment: you can change a simple svg button or image color using filters in the CSS. – Danielillo Sep 16 '18 at 9:45

As for the svg button you could try to inject a svg symbol and use it where you need it. Then to vary the colors of the button according to the theme depends on how you have structured the plugin.

Look at this codepen

Not the answer you're looking for? Browse other questions tagged or ask your own question.