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

From: Stefan Kangas <[email-masked]>
Date: Tue, 2 Nov 2021 11:58:17 -0700

Jim Porter <[email-masked]> writes:

> 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:

Thanks, this summary is useful.  I agree with all your points, but I
have some comments.

> 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.

I don't think this is fundamentally different from (1).  The shape is
independent from the color in both cases.

> 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.

Exactly the point.  This goes for built-in packages as well.