Subject: Re: bug#77841: Some svg image's black color is replaced by emacs's theme foreground color

From: Ihor Radchenko <[email-masked]>
Date: Sat, 19 Apr 2025 08:57:55 +0000

Alan Third <[email-masked]> writes:

>> Yes, this is a feature.  I think to disable it, you need to include a
>> :background setting in the image spec.  Alan, am I right?
>
> Yes, but in this particular case :foreground, probably.
>
> This behaviour is documented in the elisp manual under "SVG Images"
> and is intended to make it easier to insert images into buffers so
> they look like native widgets and the like.

I am still confused.
Consider the attached svg image.

If I emacs -Q org-ltximg_404bde694c76aad6deecfc21e91c044a6afd7948.svg
I see black background and white foreground.

If I
1. emacs -Q
2. (put-text-property 1 2 'display (create-image "/tmp/ltximg/org-ltximg_404bde694c76aad6deecfc21e91c044a6afd7948.svg"))
I see red-ish background and white foreground.

Seemingly, background and foreground are inverted in the second case.

What am I missing?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>