reddit / emacs

Has the recent 27.1 (or 27.2) release added the number of colors from 256 to 556?

whatisa_sky · 2022-05-01 14:44
After the recent updates, I noticed that my emacs custom theme doesn't work, it's just either black or white. I checked that its because the color definition has been changed from something like "color-38" to a named color such as "mistyrose" etc. And the color choices also increase. Yet as I checked in emacs release page, there doesn't seem to be new features related to color settings.
eli-zaretskii · 2022-05-01 15:25
It could be the that now Emacs treats your xterm as 24-bi "true-color" terminal.
7890yuiop · 2022-05-01 22:26
I don't know much about colour support, but 556 seems like *such* a weird value. 256 is a round number, and 512 could make sense (albeit also a bit odd), but 556 is 100% weird to me. Where has that number come from?
whatisa_sky · 2022-05-01 22:34
This is the result of M-x list-colors-display. [https://imgur.com/a/2uYcdQq](https://imgur.com/a/2uYcdQq) Look at the number at the bottom that says 556.
whatisa_sky · 2022-05-01 22:37
Does it imply that the reason is that my terminal emulator's update? I use Konsole, unfortunately I don't know when its last update was. Anyway, I just confirm that yes now my emacs in terminal support 24-bit color, which is great!
MangyCanine · 2022-05-02 02:32
Those are merely mappings between human color names and hex RGB codes. If you are seeing more names, then someone added them to a list somewhere (sorry, I don’t know where emacs gets these, offhand).
whatisa_sky · 2022-05-02 02:36
Yeah I know that should be the case. What I am curious about is that since when my terminal emacs which is v28.1 supports 24-bit and which changes (through updates) in my system that makes this happen. Not that I'm unhappy, very excited in fact just curious.
jsonr_r · 2022-05-02 07:01
Emacs ~~27~~ 26 became able to identify terminals capable of supporting 24 bit color and in Emacs 28 it can do that independently of the TERM setting in many cases, so it is most likely the update to Emacs rather than your terminal emulator that has caused this change.
jsonr_r · 2022-05-02 07:02
It's just how many named colors are defined. The actual colors supported will be at least 65536, probably 4M.
jsonr_r · 2022-05-02 07:03
Read NEWS if you want to find more about the changes (probably NEWS.26 if you are already on Emacs 28).
eli-zaretskii · 2022-05-02 16:47
> Does it imply that the reason is that my terminal emulator's update? Could very well be, yes.
[deleted] · 2022-05-02 17:15
[deleted]