reddit / emacs

Strange face (color) behavior in terminal... Any ideas?

bakuretsu ยท 2022-04-18 16:59
Edit: I think I figured it out but I'm going to leave this in case it helps someone else. The "dimness" of the rendered face was coming from the *italic* property of the face (which is not set in the face customization). All italic strings just get dimmer with any TERM configuration that doesn't support italics (like `xterm-256color` or `screen-256color`). If I set `$TERM` to `rxvt-unicode-256color`, italics actually work! Due to issues with WSLg in Windows 11 (a long and disappointing story), I've switched back to using emacs in the terminal. Everything works as expected, except for a couple of face colors in Org Agenda. Though the *attribute* face sample in the customize facility looks correct, the actual face is always a dimmed version of that color (and that is how it appears in Org Agenda as well). This has the effect of making the text nearly illegible in most cases, and I refuse to choose an artificially bright color here because it appears correctly on other devices. I have cleared all other face attributes and still this odd issue persists. I've even inspected the face applied to the preview ("sample") text itself in customize and nothing seems out of the ordinary. Why is it not displaying the color that I have chosen?? In [this image](https://imgur.com/63kcjRt), with foreground set to `brightwhite`, the face sample looks gray. In [this image](https://imgur.com/BuHSZb7), with foreground set to `color-82`, the face sample look like a dark green. I've also fiddled with the color "themes" of my terminal, but those settings have no effect on Emacs, it seems that Emacs is displaying exactly the colors it wants to. Any ideas?