From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#51556: 29.0.50; Poor contrast of Customize SVG icons with dark backgrounds Date: Tue, 2 Nov 2021 11:43:58 -0700 Message-ID: <18066bc0-86a6-5901-9a53-e2c6ea13fbc8@gmail.com> References: <87v91b92v6.fsf@gmail.com> <83fssflmcg.fsf@gnu.org> <68034911-bc12-0c9e-cabb-c870628fd80c@gmail.com> <83a6imlo23.fsf@gnu.org> <83tuguk3h2.fsf@gnu.org> <83k0hqjywm.fsf@gnu.org> <83ee7yjxb1.fsf@gnu.org> <83a6imjv2o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33626"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51556@debbugs.gnu.org, kevin.legouguec@gmail.com To: Eli Zaretskii , Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 02 19:48:48 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhypz-0008bP-2N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Nov 2021 19:48:47 +0100 Original-Received: from localhost ([::1]:59602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhypy-0008BH-2p for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Nov 2021 14:48:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhymM-0002bG-6t for bug-gnu-emacs@gnu.org; Tue, 02 Nov 2021 14:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhymL-00041I-SH for bug-gnu-emacs@gnu.org; Tue, 02 Nov 2021 14:45:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mhymL-0003sH-On for bug-gnu-emacs@gnu.org; Tue, 02 Nov 2021 14:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Nov 2021 18:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51556 X-GNU-PR-Package: emacs Original-Received: via spool by 51556-submit@debbugs.gnu.org id=B51556.163587864814793 (code B ref 51556); Tue, 02 Nov 2021 18:45:01 +0000 Original-Received: (at 51556) by debbugs.gnu.org; 2 Nov 2021 18:44:08 +0000 Original-Received: from localhost ([127.0.0.1]:38068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhylT-0003qX-Tj for submit@debbugs.gnu.org; Tue, 02 Nov 2021 14:44:08 -0400 Original-Received: from mail-pl1-f175.google.com ([209.85.214.175]:37821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhylR-0003pn-Kc for 51556@debbugs.gnu.org; Tue, 02 Nov 2021 14:44:06 -0400 Original-Received: by mail-pl1-f175.google.com with SMTP id n8so229633plf.4 for <51556@debbugs.gnu.org>; Tue, 02 Nov 2021 11:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=uCMDxPXFr0i7sVTVH+NJW37toCCuF3gv/a2RmINTf3Q=; b=cHmFCy4TEk96sSxDziSnhLpC+sRwZw0jfp/OFWTt5I0eUFbEwqGONs2CA6/JJAW/pG JeuaVdrpxbhj/yACYo7imvuaz6VklBgLXEwearP/FZWdtenfYuMyYefRe3CBYeArNOMT +D2ERPdvF5UfnJVG/bZtuCUoCk8YgjeU2EjkRQC63+LyOBuXuu4rxMQNyim2pmch5t8w e0GbH8DQ79ZGZb4twFoj9vg3i0edWp0HyqizE2juhKjXGXntHfDOItzQ8Nwc6UrV8dzv o9T3TE4eiNI9ILjC9MyfNK2FKbeet/N8XnBtzJ9FEUkASL3FDhWTcEX89lpTzuGTsOYC k9lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uCMDxPXFr0i7sVTVH+NJW37toCCuF3gv/a2RmINTf3Q=; b=nWL5kXGwKDpD11ur5DPKEKTQs01e3xZGpMwA3Vs5eXl4sTHX6Xfwn9eIblYZI1QYA7 vDUWsJVmrAvzkKxrLPapWaD8IznnCTI5pc3+gWNvkj0K8yZ56zLkjh9iExx/zETgitTV FPihTR+taJth9UkUxbwOpVGAA8U+H9rX+yd6mwCPWANM5Wv1VNyq/hhCA2SLj64do1ww SsXIylsw7czK59m+qXTQ3MtLeGI62xggU8v/d+03+1JYMg0Ec5V7H9nL8oaanyBZx9wY cbegKr8qLaHm4tgrmYLKBSvakk9CcyYLjy7hUOQQzweuGYJKjRQRuoaiklW1OQoslLWO 03LQ== X-Gm-Message-State: AOAM530j4rQe1A3RtiuFx+wLBS/Pm0pqW+oo70m3llNj61uztPA0X6wm CKFeENtPEFuR/YwmOmvO8y4= X-Google-Smtp-Source: ABdhPJxK0mSIgM6/YWjCnLj3WYifgPn7sWlGKchrmBFYrMLALxOa0HzKZ5Wxr01j+2//oVW7DLmI2w== X-Received: by 2002:a17:90b:33ca:: with SMTP id lk10mr1473999pjb.18.1635878639699; Tue, 02 Nov 2021 11:43:59 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id d18sm7213989pfv.161.2021.11.02.11.43.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Nov 2021 11:43:59 -0700 (PDT) In-Reply-To: <83a6imjv2o.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218824 Archived-At: On 11/2/2021 11:01 AM, Eli Zaretskii wrote: > If the solution you propose only works for SVG that specify no > foreground, then it won't be able to solve all of the situations where > a different theme makes an icon barely visible or unpleasant to the > eye. Which is why I think a better solution would be to allow themes > to specify different icons where necessary. I think it might help to break this problem down into parts. There are a few cases I can think of where the question of how to color an SVG might come up: 1) Single-color SVGs Some SVGs are just a single-color shape, like the Customize arrows. There's no *particular* color that's right for these, aside from "what looks good". In some ways, these SVGs are like an ordinary textual glyph, except that we've defined our own fancy shape to use. In this case, I think it makes sense to be able to specify what color to use for the SVG independently of the shape so that themes can adjust it as-needed. This case is the one initially described in this bug. 2) Multi-color SVGs Some SVGs have many colors. There's a particular set of colors that makes sense for this SVG, as defined in the file by the author. It would be difficult to programmatically alter the colors of such an SVG and maintain a good result, so we probably shouldn't try. This is a case where it may be nice to let themes specify a completely-different SVG to use. I'd consider this lower priority, since I'm not aware of a specific SVG in this category that's causing visual issues with themes. 3) Dynamically-colored SVGs This could be considered a variant of (1). Sometimes, we might want to define a particular shape, but give it different colors in different contexts. For example, if we wanted to use SVGs to display something similar to the circles in the fringe that mark GDB breakpoints, we could have a single breakpoint.svg file that we color bright red or gray depending on the breakpoint's state. This is another case where it would be convenient to be able to set an SVG's color independently of its shape. 4) Third-party packages Some packages might want to provide SVG icons to use in one way or another, along the same lines as the Customize arrows (i.e. a single-color SVG). If you're the author of a little-known package, you can't really expect theme authors to provide customized icons for your package that fit with the theme. However, themes *do* specify at least a handful of faces. As a package author, it would be convenient to be able to say "render this icon using the foreground color of the `error' face", for example. Then your package looks good with most themes without requiring anyone to provide custom SVGs.