Preserving Icon Colors

For a snippet, can Iconify icons preserve their colors in PopClip?
Is pasting in the svg info supposed to retain color?
Ive tried adding in different variations of “preserve color” to the icon line as well but no luck.
Is it currently not possible or am I probably missing something/doing it wrong?

@nick ?

Iconify icons with color should appear in color automatically.

If there’s something specific that isn’t working, post the snippet code so I can take a look.

Make sure you are on the latest PopClip (2024.12).

# popclip
name: 1337X | ⌥ BT4G
icon: svg:<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><rect width="48" height="48" fill="none"/><g fill="#b72727" stroke="#b72727" stroke-linejoin="round" stroke-width="2.1"><path d="M33 6h11L15 42H4z"/><path d="M15 6H4l29 36h11z"/></g></svg>
requirements: [text, "!url"]
url: https://1337x.to/srch?search=***
alternate url:  https://bt4gprx.com/search?q=***&category=movie

Just need to add the preserve color flag. Either:

# ...
icon: svg:<svg xmlns="...
preserve color: true
# ...

or

# ...
icon: preserve-color=1 svg:<svg xmlns="...
# ...

Thank you, that works. I tried numerous variations of “preserve color” but never found the right setup for it. I did not know it needed the =1 at the end. Woudl you be able to send me the link for where to find the documentation for this so I dont have to bother the forum with simple questions like this in the future?

EDIT
Nevermind. I found it, it was the page Ive been looking at but I did not fully reason out the logic. It explicitly says to add a =0 to remove coloring. I did not put the pieces together to try adding =1 to enable coloring since it wasnt in the example.

Here you go!: Icons — PopClip Developer

If there’s anything unclear or needing further elaboration let me know.

1 Like

Actually it seems you don’t need the =1 …but it does no harm. And you can use =0 to explicitly disable it (e.g. for emoji which automatically have color)

I say it seems because I just saw that in the docs (which I wrote…) but I had forgotten that :upside_down_face:

1 Like