1

I am trying to add some icons into ~/.local/share/icons/ so that I can use them with notify-send. I can do that just fine, but the icon colour is not adapting to the background, unlike the Adwaita icons, and the contrast ends up being incredibly low.

Note that I am able to just change the colour of the icon, but this is not a viable solution, as the icon is meant to be shared with other people, who may have light themes for their notifications.

Here is what an Adwaita icon looks like in a GNOME notification:

Notification with Adwaita icon

And here is what my other icon looks like in a GNOME notification:

Notification with my own icon

Both .svg files have the same base colour (#2e3436), but only the Adwaita one changes automatically to be legible even on a dark background. I converted my .svg file and edited it so that it resembles the Adwaita one, but I still have the same issue.

Here is what the Adwaita icon code looks like:

<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
    <path d="m 13.753906 4.660156 c 0.175782 -0.199218 0.261719 -0.460937 0.246094 -0.726562 c -0.019531 -0.265625 -0.140625 -0.511719 -0.339844 -0.6875 c -0.199218 -0.175782 -0.460937 -0.261719 -0.726562 -0.246094 c -0.265625 0.019531 -0.511719 0.140625 -0.6875 0.339844 l -6.296875 7.195312 l -2.242188 -2.242187 c -0.390625 -0.390625 -1.023437 -0.390625 -1.414062 0 c -0.1875 0.1875 -0.292969 0.441406 -0.292969 0.707031 s 0.105469 0.519531 0.292969 0.707031 l 3 3 c 0.195312 0.195313 0.464843 0.304688 0.738281 0.292969 c 0.277344 -0.007812 0.539062 -0.132812 0.722656 -0.339844 z m 0 0" fill="#2e3436"/>
</svg>

And here is what I made the other icon into:

<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
    <path d="M20.76 5.261c-.089.04-2.25 2.172-5.95 5.87L9 16.939l-2.83-2.826c-3.108-3.104-2.971-2.985-3.335-2.876-.218.065-.533.38-.598.598-.11.367-.263.192 3.236 3.692 3.507 3.507 3.308 3.333 3.697 3.232.153-.04.779-.654 6.302-6.172 3.372-3.37 6.17-6.189 6.218-6.264a.627.627 0 0 0-.033-.692c-.246-.349-.608-.498-.897-.37" fill="#2e3436"/>
</svg>
Silejonu
  • 11
  • 1

0 Answers0