Jump to content

export svg icons usable in wordpress like webicons


Recommended Posts

Hello, 

I would like to create some icons for a website (Wordpress with Elementor) whose color is changeable in Wordpress. So like the iconsets from e.g. Font Awesome. I have the icons as svg files, but whenever I upload them to wordpress, the color is no longer changeable in wordpress. 

I once found a tutorial for this and also solved this problem, but I've been looking for it for hours but can't find it anymore and can't get any further. 

Does anyone have an idea? There must be some people who design icons for the web who have this problem. 

Thanks in advance! 😎

Link to comment
Share on other sites

2 hours ago, ATTk20 said:

Does anyone have an idea?

Of course, do a Google etc. search after that topic on the net!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

1 hour ago, ATTk20 said:

If you don't have the answer, please stop posting nonsense. None of your links helps in any way. 

First of all don't be rude here if people are going to help you at all! - Second check the links more carefully and read through the contents they point here.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Hi @ATTk20,

If your intention is simply to be able to change the colour of the SVG icons as a whole, rather than individual parts of each icon, then an alternative and easier approach would be to use CSS filters which will allow you to target the SVG file as an image element...

HTML

    <div class="row">
        <div class="column icon">
            <img class="svgcolour" src="media/android.svg" alt="android">
        </div>
        <div class="column icon">
            <img class="svgcolour" src="media/instagram.svg" alt="instagram">
        </div>
        <div class="column icon">
            <img class="svgcolour" src="media/twitter.svg" alt="twitter">
        </div>
        <div class="column icon">
            <img class="svgcolour" src="media/skype.svg" alt="skype">
        </div>
    </div>

CSS

.svgcolour {
    filter: invert(55%) sepia(100%) saturate(50) hue-rotate(0deg) brightness(100%) contrast(100%);
}

You can then apply any of the eleven CSS filters, blur, brightness, contrast, grayscale, hue-rotate, invert, opacity, saturate, sepia, drop-shadow and url...

If you start with black svg icons and then use the invert() filter, chain the sepia() filter to it along with saturate(), hue-rotate(), brightness() and contrast() you have a lot of flexibility...

The hue-rotate values are the same as Affinity apps, i.e., Red = 0°, Orange = 30°, Yellow = 60° and so on...

HueValues.png.4802ad0231ba5f415cbbf1aa4811c0cc.png

 

 

 

Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5
Affinity Designer Beta 2.6.0.2861 | Affinity Photo Beta 2.6.0.2861 | Affinity Publisher Beta 2.6.0.2861

MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse
HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.