>>>>>> I just checked again, and list-colors-display only lists eight >>>>>> colors in a raw Linux console. >>>>> >>>>> What does display-color-cells return in that case? >>>> >>>> 16777216 >>> >>> Then I guess linux.el should call the same color setup code as >>> xterm.el does in this case. >> >> That's the value I get on my system, is it guaranteed to be the same on >> other systems? > > Answering my own question: no. I just tried on another computer, with a > similar kernel (5.17 instead of 5.18), and there display-color-cells > returns 8. So I guess we use the most conservative value here. We > could make the (xterm-register-default-colors xterm-standard-colors) > call conditional to the return value of display-color-cells, though. > Answering my own suggestion: no. I just tried, and for some reason it doesn't work. Here's a screenshot of list-colors-display with (xterm-register-default-colors xterm-standard-colors) in lisp/term/linux.el. As you can see, bright colors and non-bright colors are displayed in the same way, and other colors are displayed wrongly. Perhaps there's another way, though.