Subject: Re: bug#51556: 29.0.50; Poor contrast of Customize SVG icons with dark backgrounds

From: Stefan Kangas <[email-masked]>
Date: Tue, 2 Nov 2021 08:26:12 -0700

Stefan Kangas <[email-masked]> writes:

>> As for foreground: what does it mean to remove the foreground from an
>> image?

(I realize that I didn't answer this part in my previous reply.)  SVG is
a special case, where we just use the foreground of the current face.

In this case, I think the fix is as simple as the attached patch.  I've
tested this with several themes, and it looks very good to my eyes.

I suggest that we install this fix on emacs-28.
From b6682bb4f3d7992f0594b848605937f358f93a33 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <[email-masked]>
Date: Tue, 2 Nov 2021 16:21:19 +0100
Subject: [PATCH] Use current face foreground for SVG icons in customize

* etc/images/down.svg:
* etc/images/left.svg:
* etc/images/right.svg:
* etc/images/up.svg: Don't define foreground; this means they will use
the foreground of the currently defined face instead.  (Bug#51556)
---
 etc/images/down.svg  | 2 +-
 etc/images/left.svg  | 2 +-
 etc/images/right.svg | 2 +-
 etc/images/up.svg    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/etc/images/down.svg b/etc/images/down.svg
index e2760427d7..707cd23ea4 100644
--- a/etc/images/down.svg
+++ b/etc/images/down.svg
@@ -25,7 +25,7 @@
   <title id='title8473'>Gnome Symbolic Icons</title>
   <defs id='defs7386'/>
   <g inkscape:groupmode='layer' id='layer10' inkscape:label='ui' transform='translate(-152.00586,-952)'>
-    <path inkscape:connector-curvature='0' d='m 166,957 -5.99414,5.99999 L 154,957 Z' id='path6424' sodipodi:nodetypes='cccc' style='fill:#2e3436;fill-opacity:1;stroke:none'/>
+    <path inkscape:connector-curvature='0' d='m 166,957 -5.99414,5.99999 L 154,957 Z' id='path6424' sodipodi:nodetypes='cccc' style='fill-opacity:1;stroke:none'/>
   </g>
   <g inkscape:groupmode='layer' id='layer1' inkscape:label='status' transform='translate(-152.00586,-888)'/>
   <g inkscape:groupmode='layer' id='layer11' inkscape:label='legacy' transform='translate(-152.00586,-952)'/>
diff --git a/etc/images/left.svg b/etc/images/left.svg
index d6429bc410..893515d2df 100644
--- a/etc/images/left.svg
+++ b/etc/images/left.svg
@@ -25,7 +25,7 @@
   <title id='title8473'>Gnome Symbolic Icons</title>
   <defs id='defs7386'/>
   <g inkscape:groupmode='layer' id='layer10' inkscape:label='ui' transform='translate(-92.005848,-951.99999)'>
-    <path inkscape:connector-curvature='0' d='M 103,966 97.00585,959.99999 103,954 Z' id='path6400' sodipodi:nodetypes='cccc' style='fill:#2e3436;fill-opacity:1;stroke:none'/>
+    <path inkscape:connector-curvature='0' d='M 103,966 97.00585,959.99999 103,954 Z' id='path6400' sodipodi:nodetypes='cccc' style='fill-opacity:1;stroke:none'/>
   </g>
   <g inkscape:groupmode='layer' id='layer1' inkscape:label='status' transform='translate(-92.005848,-887.99999)'/>
   <g inkscape:groupmode='layer' id='layer11' inkscape:label='legacy' transform='translate(-92.005848,-951.99999)'/>
diff --git a/etc/images/right.svg b/etc/images/right.svg
index d58cd36435..6c7d715939 100644
--- a/etc/images/right.svg
+++ b/etc/images/right.svg
@@ -25,7 +25,7 @@
   <title id='title8473'>Gnome Symbolic Icons</title>
   <defs id='defs7386'/>
   <g inkscape:groupmode='layer' id='layer10' inkscape:label='ui' transform='translate(-112.00585,-951.99999)'>
-    <path inkscape:connector-curvature='0' d='m 117,966 6.00585,-6.00001 L 117,954 Z' id='path6412' sodipodi:nodetypes='cccc' style='fill:#2e3436;fill-opacity:1;stroke:none'/>
+    <path inkscape:connector-curvature='0' d='m 117,966 6.00585,-6.00001 L 117,954 Z' id='path6412' sodipodi:nodetypes='cccc' style='fill-opacity:1;stroke:none'/>
   </g>
   <g inkscape:groupmode='layer' id='layer1' inkscape:label='status' transform='translate(-112.00585,-887.99999)'/>
   <g inkscape:groupmode='layer' id='layer11' inkscape:label='legacy' transform='translate(-112.00585,-951.99999)'/>
diff --git a/etc/images/up.svg b/etc/images/up.svg
index 9e1a245be7..e358c29912 100644
--- a/etc/images/up.svg
+++ b/etc/images/up.svg
@@ -25,7 +25,7 @@
   <title id='title8473'>Gnome Symbolic Icons</title>
   <defs id='defs7386'/>
   <g inkscape:groupmode='layer' id='layer10' inkscape:label='ui' transform='translate(-132.00585,-952)'>
-    <path inkscape:connector-curvature='0' d='M 146,963 140.00585,956.99999 134,963 Z' id='path6418' sodipodi:nodetypes='cccc' style='fill:#2e3436;fill-opacity:1;stroke:none'/>
+    <path inkscape:connector-curvature='0' d='M 146,963 140.00585,956.99999 134,963 Z' id='path6418' sodipodi:nodetypes='cccc' style='fill-opacity:1;stroke:none'/>
   </g>
   <g inkscape:groupmode='layer' id='layer1' inkscape:label='status' transform='translate(-132.00585,-888)'/>
   <g inkscape:groupmode='layer' id='layer11' inkscape:label='legacy' transform='translate(-132.00585,-952)'/>
-- 
2.30.2