I have created several Python3
appindicators
initially for Ubuntu
and subsequently other platforms. For each appindicator
, I have created a single-coloured, SVG icon, which I use as the hicolor
icon.
My build script takes the hicolor
icon for a given appindicator
and iterates over a list of pairs (each pair comprises a theme name and icon colour, such as Adwaita
and #2e3436
respectively) and swaps out the hicolor
value for the theme colour (#2e3436
).
To obtain the icon colour for a given theme, I determine the default theme using
gsettings get org.gnome.desktop.interface gtk-theme
which yields Adwaita
for Debian 12
for example.
Using what I assumed to be an icon which is common, irrespective of platform and theme, I chose /usr/share/icons/Adwaita/scalable/status/audio-volume-high-symbolic.svg
and found to have a single colour #2e3436
which is a dark grey.
What I don’t understand is how that dark grey is converted into what I see on a default installation of Debian 12
as a bright white (not grey nor dark grey). This happens also on Fedora 39
using the default Adwaita
theme.
On Ubuntu 20.04
the icon audio-volume-high-symbolic.svg
for the default Yaru
theme has a light grey shade but is rendered as a “subdued” white.
For other platforms, stranger things: On Lubuntu 22.04
, the theme is Arc-Darker
but there is no /usr/share/icons/Arc*Darker
folder. Similarly for Xubuntu 22.04
, the theme is Greybird
but there is no /usr/share/icons/Greybird
.
Looking at /usr/share/themes
I can see references to .css
files but no mention of colours.
In short: If I want to take my SVG icon and have a version for a particular theme, from where do I obtain the colour which will be rendered as the colour on screen? I am hoping that all themes/icons use the same mechanism and once I sort this out for Adwaita
, other themes should follow…