protesilaos / modus-themes

Highly accessible themes for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA).
https://protesilaos.com/emacs/modus-themes
GNU General Public License v3.0
553 stars 30 forks source link

Foreground color of text with syntax highlighting is not preserved when region is active/highlighted #111

Closed jjnilton closed 3 months ago

jjnilton commented 3 months ago

The issue is that when the region is active and highlighted, the foreground color/syntax highlighting is not visible, at least for a buffer in Elisp Mode. Other themes seem to preserve the foreground color of the syntax highlighting when a region is active.

On a fresh install, I tried to customize the modus-themes-region to bg-only, but the foreground colors from the syntax highlighting still weren't visible: https://www.gnu.org/software/emacs/manual/html_node/modus-themes/Active-region.html

VirtualBox_debian-testing_03_07_2024_17_16_38

Updating to the newest version (4.4.0) from gnu, the modus-themes-region variable wasn't available anymore, so I tried to use the first alternative from the snippet below, but it don't work either: https://protesilaos.com/emacs/modus-themes#h:c8605d37-66e1-42aa-986e-d7514c3af6fe

Using the following config, I could see the syntax highlighting in the foreground color as I expected (although wasn't as easy to read):

(set-face-attribute 'region nil :foreground 'unspecified)

VirtualBox_debian-testing_03_07_2024_17_29_17

System: Modus Themes 3.0.0 (built-in) Debian Trixie/Sid Emacs 29.4

jjnilton commented 3 months ago

Never mind, it seems all it was needed was to (load-theme 'modus-vivendi) after the customization in the config file.