]> git.ipfire.org Git - thirdparty/systemd.git/commit
terminal-util: define grey as 256color ANSI sequence
authorLennart Poettering <lennart@poettering.net>
Fri, 10 May 2019 18:52:05 +0000 (14:52 -0400)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 May 2019 19:00:55 +0000 (15:00 -0400)
commitbb40c12569d017f75774ff9f4b6fb0ac64f9eee0
treec18cb3366c9e3d46a336e2c42b6bc41b0310df8a
parentf4a8ca329a30896359226eaf7ba3f6812f4f0bff
terminal-util: define grey as 256color ANSI sequence

Apparently all relevant terminals implement these sequences, including
the Linux kernel, rxvt, xterm, and of course gnome terminal. Hence it
should be OK to use them, and fixate the grey color in a way that maps
to the same color in all terminals.

Ideally we'd stick to the more symbolic colors that allow terminal
emulators to implement color styles, but this apparently doesn#t work,
since rxvt maps grey to something unreadable by default.

Note that this change has negative effects besides the non-themability
of the palette: the midrange grey this uses maps to regular white on the
linux console. However, that's probably not too bad: allowing things to
be unreadable on some terminals is probably worse than showing no color
on some terminals.

Fixes: #12482
src/basic/terminal-util.h