Bug 502681 - Make creating recolorable icons simpler
Summary: Make creating recolorable icons simpler
Status: REPORTED
Alias: None
Product: frameworks-kiconthemes
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Christoph Feck
URL: https://gitlab.freedesktop.org/xdg/de...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-11 14:34 UTC by Ilya Fedin
Modified: 2025-04-16 14:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Fedin 2025-04-11 14:34:26 UTC
SUMMARY
Right now this requires creating a <style> tag with a CSS rule for ColorScheme classes in use and fill=currentColor in each recolorable element. GTK can recolor icons without all this, just add a class and the job done. No <style> tags, no fill=currentColor. This would make creating such icons by third parties way more appealing as they wouldn't have to think what to do when they have an already existing icons having multiple elements with different `fill` values yet logically mapping to the same ColorScheme class. It will be a one line change for each element.

STEPS TO REPRODUCE
1. Try to make a recolorable icon

OBSERVED RESULT
As easy as in GTK world

EXPECTED RESULT
Harder :(

ADDITIONAL INFORMATION
I hope this isn't a technical limitation in QtSvg or something like that... But this is a valid feature request regardless I believe.
Comment 2 Nate Graham 2025-04-11 18:21:36 UTC
Our way supports more than 4 colors; GNOME's doesn't. Trade-offs either way, and us syncing to GNOME's thing wouldn't make sense for our use cases, any more than I suspect them syncing to ours would suit them.

Ultimately this needs to be discussed upstream and turned into a standard everyone can support. See https://gitlab.freedesktop.org/xdg/default-icon-theme/-/issues/24
Comment 3 Ilya Fedin 2025-04-12 03:23:33 UTC
But I didn't ask to limit to 4 colors. I asked kiconthemes to add <style> tags automatically rather than icon creator. And to not to force the icon creator to set fill=currentColor (apparently by using `fill`instead of `color` in CSS rules?). GTK doesn't require icon creator to do anything of that so kiconthemes should be able to not require too.

I also don't think it has to depend on upstream discussion, recolorization is already existing while upstre discussion has stuck. If you won't do any enhancements until upstream decides something, it likely meant no enhancements possible at all.
Comment 4 Nate Graham 2025-04-16 14:25:05 UTC
Can you supply an example of an existing KDE Icon modified to be formatted the way you'd like KIconThemes to support?