this post was submitted on 01 Nov 2023
1 points (100.0% liked)

Emacs

314 readers
2 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

Gnuplot generates SVG images in Org Babel as shown below.

In the left solarized-dark theme, the SVG images exhibit a brown background that blends with the dark theme, resulting in very reduced visibility.

Conversely, in the right solarized-light theme, the SVG images display a pleasant light-blue background, offering excellent readability.

https://preview.redd.it/v1rb8scyvhxb1.png?width=1158&format=png&auto=webp&s=384dd8adef7ab7e085fb3887d1a1207a8468aa6e

How can SVG images be displayed with a light-blue background in the dark theme, as it is in the light theme?

top 2 comments
sorted by: hot top controversial new old
[–] AbstProcDo@alien.top 1 points 1 year ago

The issue of setting a light-colored background for SVG images in org-babel can be resolved using gnuplot's own settings.

` set terminal svg background "#ffffff" `

https://preview.redd.it/a5o9vtozfnxb1.png?width=575&format=png&auto=webp&s=b96967b2a9c85d4c454e9ec899f2be33e4dadabd

[–] egstatsml@alien.top 1 points 1 year ago

You could look at how Tecosaur does their splash screen, which uses SVGs and adjusts them based on the theme.

https://tecosaur.github.io/emacs-config/config.html#fancy-splash-screen

https://www.reddit.com/r/emacs/comments/fzz4l6/my_fancy_splash_screen/

Or maybe check out how PDF-tools handles midnight mode

https://github.com/vedang/pdf-tools/blob/c69e7656a4678fe25afbd29f3503dd19ee7f9896/lisp/pdf-view.el#L113